You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Martin Marinschek <ma...@gmail.com> on 2005/01/26 13:57:29 UTC

findComponent with UIData

Hi there,

I am having a problem giving me a hard time with components nested in a UIData.

The problem is that finding these components does not work in all
cases - imagine the case that a message is added by a validator.

This message gets a client-id, as this is done while stepping through
the rows of the UIData, this client-id looks like that:
form:data_6:cname...

If I call UIComponentBase.findComponent later on providing this
clientId, I will not find a component as the findComponent method only
checks for the ids; and will not associate the data_6 part of the
client-id with the correct component. It will always return null!

What do you guys think about that problem? Anyone having a workaround?

regards,

Martin

Re: findComponent with UIData

Posted by Heath Borders <he...@gmail.com>.
I'm thinking this might be a spec bug.  The UIData should override the
findcomponent method to call findcomponent for all of its applicable
rows.  Unfortunately this is not the case now.


On Wed, 26 Jan 2005 13:57:29 +0100, Martin Marinschek
<ma...@gmail.com> wrote:
> Hi there,
> 
> I am having a problem giving me a hard time with components nested in a UIData.
> 
> The problem is that finding these components does not work in all
> cases - imagine the case that a message is added by a validator.
> 
> This message gets a client-id, as this is done while stepping through
> the rows of the UIData, this client-id looks like that:
> form:data_6:cname...
> 
> If I call UIComponentBase.findComponent later on providing this
> clientId, I will not find a component as the findComponent method only
> checks for the ids; and will not associate the data_6 part of the
> client-id with the correct component. It will always return null!
> 
> What do you guys think about that problem? Anyone having a workaround?
> 
> regards,
> 
> Martin
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org