Facelets duplicate id
I'm creating a facelet component which I intened to include many times in a single page.
I need to define one a4j:outputPanel tag inside my component and give it an id, so that it would be possible to reRender this outputPanel via ajax. But facelets seems not to handle that situation as "duplicateId Exception" is thrown. I partialy understand why this happen. I have included several components in a single page, but each component contains outputPanel with the same hardcoded id.
- Can id not be hardcoded?开发者_如何学Go
- Is there any facelets tag that creates boundary in which you don't have to care about conflicts between ids of objects inside that boundary with ids of objects outside the boundary?
Creating a subview actually over comes the problem with partialTriggers. <ui:component> <f:subview id="#{id}"> ....component code </f:subview> </ui:component>
This is a way to avoid hard coded ids by passing the id into the component such as:
ac:testComponent id="someId"
In the facelet component then:
h:outputText id="#{id}_outputText"
The problem is that trinidad does not support this EL language for the partialTriggers attribute. If anyone knows how to do this please post to this site an explanation.
精彩评论