With multiple commandlinks with same child-component id, tomahawk will always
find the first commandlink's child component
--------------------------------------------------------------------------------------------------------------------------
Key: TOMAHAWK-1056
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1056
Project: MyFaces Tomahawk
Issue Type: Bug
Components: Extended CommandLink/CommandButton
Affects Versions: 1.1.6
Environment: Linux Ubuntu Feisty Fawn 7.04, MyFaces 1.1.5, Facelets
1.1.11, ajax4jsf 1.1.1, richfaces 3.0.1
Reporter: Kenneth Buvik
Priority: Minor
<ul id="language" style="float:right;">
<li>
<t:commandLink id="changelocale_en" style="color:blue;"
value="English" actionListener="#{profileBean.changeLocale}">
<f:param id="locale" name="locale_1" value="en"/>
</t:commandLink>
</li>
<li>
<t:commandLink id="changelocale_nb" style="color:blue;"
value="Bokmål" actionListener="#{profileBean.changeLocale}">
<f:param id="locale" name="locale_2" value="nb"/>
</t:commandLink>
</li>
<li>
<t:commandLink id="changelocale_nn" style="color:blue;"
value="Nynorsk" actionListener="#{profileBean.changeLocale}">
<f:param id="locale" name="locale_3" value="nn"/>
</t:commandLink>
</li>
</ul>
This code works. however when finding child by ID, the child of the first
t:commandlink returns.
UIParameter param = (UIParameter)
evt.getComponent().getChildren().get(0);
// UIParameter param = (UIParameter)
evt.getComponent().findComponent("locale"); // Always returns
// the child of the first <t:commandLink
String locale = String.valueOf(param.getValue());
Locale loc = new Locale(locale);
JSFUtil.getFacesContext().getViewRoot().setLocale(loc);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.