You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by lucast <lu...@hotmail.com> on 2012/01/13 10:54:13 UTC

Setting object on Parent panel and checking its value on grand-child panel

Dear Forum,
I have set  a drop down list on a parent panel A and at one point or another
I need to check the value selected from that drop down on a grand-child
panel.The structure I have is as follows:
Parent Panel A contains
Child panel B which contains
grand-child panel C.

I have set object O as ModelObject of the drop down list in panel A.

How can I check the value of Object O in grand-child panel C?
I have passed the Object O as a parameter when initializing the panels, but
when checking the values of object O in grand-child panel C, they have not
been updated. I only see the values that O has been set with when
initializing panel C.

I could pass parent panel as a parameter to the child and grand-child panels
so I can call parent.getObject(). But is there a better way to do this? 
is it possible for  panel C to read the updated values of Object O without
the need to pass panel A to the constructor of grand-child panel C?

Thanks in advance and I apologise if I'm rather unclear in my question.

Lucas

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Setting-object-on-Parent-panel-and-checking-its-value-on-grand-child-panel-tp4291808p4291808.html
Sent from the Users forum 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


Re: Setting object on Parent panel and checking its value on grand-child panel

Posted by Igor Vaynberg <ig...@gmail.com>.
dont pass the model object itself, pass the model.

-igor

On Fri, Jan 13, 2012 at 1:54 AM, lucast <lu...@hotmail.com> wrote:
> Dear Forum,
> I have set  a drop down list on a parent panel A and at one point or another
> I need to check the value selected from that drop down on a grand-child
> panel.The structure I have is as follows:
> Parent Panel A contains
> Child panel B which contains
> grand-child panel C.
>
> I have set object O as ModelObject of the drop down list in panel A.
>
> How can I check the value of Object O in grand-child panel C?
> I have passed the Object O as a parameter when initializing the panels, but
> when checking the values of object O in grand-child panel C, they have not
> been updated. I only see the values that O has been set with when
> initializing panel C.
>
> I could pass parent panel as a parameter to the child and grand-child panels
> so I can call parent.getObject(). But is there a better way to do this?
> is it possible for  panel C to read the updated values of Object O without
> the need to pass panel A to the constructor of grand-child panel C?
>
> Thanks in advance and I apologise if I'm rather unclear in my question.
>
> Lucas
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Setting-object-on-Parent-panel-and-checking-its-value-on-grand-child-panel-tp4291808p4291808.html
> Sent from the Users forum 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
>

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