This content has been marked as final.
Show 2 replies
-
1. Re: assigning ids to components
dxxvi Feb 23, 2009 2:48 AM (in response to aish)I had that problem before and it was because I used session-scoped JSF components, for example <rich:tabPanel> is bound to a session-scoped bean (the JSF spec advises that components should be bound to request-scoped objects only).
I have a facelets custom component which will render a <h:panelGroup>. The id of the panelGroup is the one of the facelets component (let's call it _id) or an auto-generated one. So<h:panelGroup id="#{empty _id ? someBean.id : _id}"
wherepublic class SomeBean { public String getId() { return FacesContext.getCurrrentInstance().getViewRoot().createUniqueId(); } }
Not sure if I understand your situation correctly. -
2. Re: assigning ids to components
nbelaevski Feb 23, 2009 4:57 AM (in response to aish)Hi Aish,
You can develop XSLT template and auto-generate ids: http://www.w3schools.com/XSL/func_generateid.asp.