webtier@glassfish.java.net

Re: [webtier] Possible JSF2.0 PR UIComponent.findComponent() bug?

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Tue, 17 Feb 2009 08:52:33 -0800

Lincoln Baxter, III wrote:
> Seems like if the JSF form attribute "prependId" is set to "false",
> the UIViewRoot cannot find any Components within the form.
>
> When prependId is left on (defaults to true), this works.
>
> This also seems to be having trouble in nested tables. (I havent tried
> just one table yet.)
I believe this is working as intended. UIComponent.findComponent()
operates on naming containers.
When you have prependId set to false, then the naming container
information is lost.

You could probably still get this to work, but you'd have to break it
into a couple of steps (basically
doing what the default findComponent() does when NamingContainer
information is present):

1. Call findComponent() for the top level form ID (assuming it's a
child of UIViewRoot and not nested
     within another naming container)
2. Using the form component found in step 1, search for the child of
interest.


>
> --Lincoln