Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove auto generated j_id from composite components

I'm loving the jsf 2.0 composite component setup. One other thing I love is prependId="false" on forms. Is there an equivalent that can be defined in cc:interface or cc:implementation that will prevent jsf from creating a j_id to prepend to the ids defined within the composite component?

like image 924
Dave Maple Avatar asked Mar 08 '11 23:03

Dave Maple


1 Answers

That's not possible. Just give the component a fixed id instead letting JSF autogenerate one. The same applies on forms by the way. This way you can still select them using CSS selectors.

Or better, just give them a styleClass so that you don't need to select by ID, for the case that this aversion was actually caused by inability to select components/elements by client ID (I don't see other feasible reasons).

like image 113
BalusC Avatar answered Oct 09 '22 04:10

BalusC