webtier@glassfish.java.net

Re: [webtier] JSF page fragments, tabs, and duplicate id errors

From: Jim Driscoll <Jim.Driscoll_at_Sun.COM>
Date: Sun, 24 May 2009 18:35:53 -0700

Well, without really knowing everything in your app, I can zero in on a
couple of things here, and give a recommendation:



On 5/21/09 12:55 PM, webtier_at_javadesktop.org wrote:
> When I do this, I get duplicate component id errors. I assume this is because some of the component IDs are specified in the page fragment JSPs.

So, the problem is that you've named a bunch of things id="foo".

There are two ways to fix this without too much work. One is to remove
the id="foo" - it's quite possible that you don't need it... the other
way is to wrap that tag in another naming container that is lacking an
id. So, for instance, form. Either way, the component will still have
an id, it'll just be an automatically generated one.

Jim