-
1. How to set id in <h:selectBooleanCheckbox> within <rich:column>?
lfryc May 5, 2011 4:03 AM (in response to raid3n)Hi raid3n, could you check with <h:outputText value="#{tb.id}" /> that this value expressions is actually providing right Ids?
-
2. How to set id in <h:selectBooleanCheckbox> within <rich:column>?
raid3n May 5, 2011 4:04 AM (in response to lfryc)yes, right ids!
-
3. How to set id in <h:selectBooleanCheckbox> within <rich:column>?
raid3n May 5, 2011 4:16 AM (in response to raid3n)If I set the attribute name with #{tb.id}
<h:selectBooleanCheckbox name="#{tb.id}" />
it becomes:
<input type="checkbox" name="trucks_datatable-0-j_idt80" />
<input type="checkbox" name="trucks_datatable-1-j_idt80" />
<input type="checkbox" name="trucks_datatable-1-j_idt80" />
but the values of #{tb.id} are: 324,336,335 so I'm expecting
<input type="checkbox" name="324" />
<input type="checkbox" name="336" />
<input type="checkbox" name="335" />
trucks_datatable is the id of the rich:datatable
-
4. How to set id in <h:selectBooleanCheckbox> within <rich:column>?
lfryc May 5, 2011 4:45 AM (in response to raid3n)Could you please provide details about environment you are using?
Version of RichFaces / JSF / server?
-
5. How to set id in <h:selectBooleanCheckbox> within <rich:column>?
raid3n May 5, 2011 4:48 AM (in response to lfryc)rf4 final / mojarra 2.1.1 / tomcat 7.0.12
-
6. Re: How to set id in <h:selectBooleanCheckbox> within <rich:column>?
raid3n May 5, 2011 4:52 AM (in response to raid3n)Another thing that I don't understand is:
if I set an id, why I have <element id="something-myid-something..."> I would only my id. I know the prependId for <h:form>, but for the other elements?
<td id="trucks_datatable-0-j_idt77" class="rf-dt-c">4814</td>
-
7. Re: How to set id in <h:selectBooleanCheckbox> within <rich:column>?
lfryc May 7, 2011 7:48 AM (in response to raid3n)The problem with "Empty id attribute is not allowed" is that EL tries to evaluate expression #{tb.id} at time when no "tb" attribute is registered in ExternalContext, and that's because ID needs to be evaluated when view is being built. "var" attribute is then processed later in the lifecycle during iteration and registers "tb" in ExternalContext when it can be obtained by ELResolver when evaluating #{tb}.
It seems for me that no expressions using variable registered by "var" can be used in ID attribute, but may be also problem of JSF RI implementation.