This content has been marked as final.
Show 3 replies
-
1. Re: After updating to 2.0.0.GA uiComponent.findComponent(str
jbuechel Nov 7, 2007 3:59 AM (in response to jbuechel)The cause for this behavior is the s:decorate tag generates different clientIds of its children:
This is the xhtml code:... <h:form id="missionForm"> <s:decorate template="#{theme.inputSecretHorizontal}"> <ui:param name="fwcLabelMessageKey" value="user_label_new_password" /> <ui:param name="fwcInputProperty" value="#{user.newPassword}" /> <ui:param name="fwcInputRequired" value="true" /> </s:decorate> <s:decorate template="#{theme.inputSecretHorizontal}"> <ui:param name="fwcLabelMessageKey" value="user_label_verify_password" /> <ui:param name="fwcInputProperty" value="#{user.verifyPassword}" /> <ui:param name="fwcInputRequired" value="true" /> <ui:define name="fwcInputValidator"> <f:validator validatorId="com.frox.fwc.validator.equalsFieldValidator" /> <f:attribute name="comparedFieldId" value="user_label_new_password" /> <s:validate /> </ui:define> </s:decorate> ...
Before (2.0.0.BETA1) the clientId of the HtmlInputSecret component was generated as:[1]= HtmlInputSecret (id=4867) _values= Object[35] (id=4869) accesskey= null alt= null attributes= UIComponentBase$AttributesMap (id=4870) autocomplete= null bindings= HashMap<K,V> (id=4872) children= null clientId= "missionForm:user_label_new_password" converter= null converterMessage= null converterMessageSet= false dir= null disabled= false disabled_set= false facets= null id= "user_label_new_password" immediate= false ...
Now (2.0.0.GA):[1]= HtmlInputSecret (id=330) _values= Object[35] (id=5112) accesskey= null alt= null attributes= UIComponentBase$AttributesMap (id=5113) autocomplete= null bindings= HashMap<K,V> (id=5114) children= null clientId= "missionForm:j_id55:user_label_new_password" converter= null converterMessage= null converterMessageSet= false dir= null disabled= false disabled_set= false facets= null id= "user_label_new_password" immediate= false immediateSet= false isUIComponentBase= false isUIComponentBaseIsSet= false label= null lang= null
Hope this helps some orthers doing the migration.. -
2. Re: After updating to 2.0.0.GA uiComponent.findComponent(str
saeediqbal1 Nov 7, 2007 5:22 AM (in response to jbuechel)So how did you get around it in the java code?
-
3. Re: After updating to 2.0.0.GA uiComponent.findComponent(str
jbuechel Nov 7, 2007 6:22 AM (in response to jbuechel)Sorry, i missed giving that information.
I replaced:UIComponent comparedUIComponent = uiComponent.findComponent(comparedFieldId);
with:UIComponent comparedUIComponent = FacesContext.getCurrentInstance().getViewRoot() .findComponent(comparedFieldId);