You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Istvan De <su...@freemail.hu> on 2007/12/10 11:19:51 UTC

components by property expressions

Hi!

When I use CompoundPropertyModels, I can automatically wire together my 
model with the components.

However, now what I need to do is to find the corresponding Component by 
a property expression. How to do this? Eg. if there is a CPM attached to 
my form, with a model object of a User, I need to find out what 
Component is bound to the "loginName" field of the model.

How to achieve this?

Best regards,
Istvan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: components by property expressions

Posted by Alex Objelean <al...@isdc.ro>.
A solution can be:

use IVisitor on the form to traverse all the children, and find the one
which have markupId == "loginName".

I am curious, why do you need this?

Regards, 
Alex.


Istvan De wrote:
> 
> Hi!
> 
> When I use CompoundPropertyModels, I can automatically wire together my 
> model with the components.
> 
> However, now what I need to do is to find the corresponding Component by 
> a property expression. How to do this? Eg. if there is a CPM attached to 
> my form, with a model object of a User, I need to find out what 
> Component is bound to the "loginName" field of the model.
> 
> How to achieve this?
> 
> Best regards,
> Istvan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/components-by-property-expressions-tp14250406p14255679.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org