Re: Design question : accessing components between panels

2008-11-05 Thread Arun Wagle

Hi,

I had tried getPage() but it returns null to me.
Is it because the panel in which I am trying to access the other panel
component is a modal dialog?

Any suggestions.



igor.vaynberg wrote:
 
 component#getPage()
 
 -igor
 
 On Tue, Nov 4, 2008 at 9:28 PM, Arun Wagle [EMAIL PROTECTED] wrote:
 Hello ,

 I have an application which renders a page.
 This page has two panels , panel A and panel B
 Each panel has some components in it.

 Now I want to access some component in panel B from panel A.

 Can someone tell me how do I get a handle to panel B in panel A ?

 If I have an instance of the page, then I can do a *get(id of panel B)*
 to
 get the instance of panel B
 But how do I get the instance of the home page in panel A ?

 How can I acheive this scenarion in the best possible way?

 Can someone please help me as I have lot of cases with these scenarious ?




 Regards,
 Arun Wagle

 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Design-question-%3A-accessing-components-between-panels-tp20336382p20343178.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Design question : accessing components between panels

2008-11-05 Thread Michael Sparer

Whenever getPage() returns null it's most likely that the component isn't
added to a page yet. Just a guess: you're calling getPage() in the
constructor of your panel right? Try calling it in the onBeforeRender method
and page won't return null

hope that helps
Michael

Arun Wagle wrote:
 
 Hi,
 
 I had tried getPage() but it returns null to me.
 Is it because the panel in which I am trying to access the other panel
 component is a modal dialog?
 
 Any suggestions.
 
 
 
 igor.vaynberg wrote:
 
 component#getPage()
 
 -igor
 
 On Tue, Nov 4, 2008 at 9:28 PM, Arun Wagle [EMAIL PROTECTED]
 wrote:
 Hello ,

 I have an application which renders a page.
 This page has two panels , panel A and panel B
 Each panel has some components in it.

 Now I want to access some component in panel B from panel A.

 Can someone tell me how do I get a handle to panel B in panel A ?

 If I have an instance of the page, then I can do a *get(id of panel
 B)* to
 get the instance of panel B
 But how do I get the instance of the home page in panel A ?

 How can I acheive this scenarion in the best possible way?

 Can someone please help me as I have lot of cases with these scenarious
 ?




 Regards,
 Arun Wagle

 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Design-question-%3A-accessing-components-between-panels-tp20336382p20343221.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Design question : accessing components between panels

2008-11-05 Thread Timo Rantalaiho
On Wed, 05 Nov 2008, Arun Wagle wrote:
 I have an application which renders a page.
 This page has two panels , panel A and panel B
 Each panel has some components in it.
 
 Now I want to access some component in panel B from panel A.

What exactly do you want to do with the panel B component in
panel A?

 Can someone tell me how do I get a handle to panel B in panel A ?

getPage().visitChildren(PanelB.class, new IVisitor() {
...
});

 Can someone please help me as I have lot of cases with these scenarious ?

Then you could have a look at

  https://issues.apache.org/jira/browse/WICKET-1312

and the blog posts referenced in it.

There has also been a lot of discussion of these scenarios 
on this mailing list before, so you could search Nabble on
that.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Design question : accessing components between panels

2008-11-04 Thread Arun Wagle
Hello ,

I have an application which renders a page.
This page has two panels , panel A and panel B
Each panel has some components in it.

Now I want to access some component in panel B from panel A.

Can someone tell me how do I get a handle to panel B in panel A ?

If I have an instance of the page, then I can do a *get(id of panel B)* to
get the instance of panel B
But how do I get the instance of the home page in panel A ?

How can I acheive this scenarion in the best possible way?

Can someone please help me as I have lot of cases with these scenarious ?




Regards,
Arun Wagle


Re: Design question : accessing components between panels

2008-11-04 Thread Igor Vaynberg
component#getPage()

-igor

On Tue, Nov 4, 2008 at 9:28 PM, Arun Wagle [EMAIL PROTECTED] wrote:
 Hello ,

 I have an application which renders a page.
 This page has two panels , panel A and panel B
 Each panel has some components in it.

 Now I want to access some component in panel B from panel A.

 Can someone tell me how do I get a handle to panel B in panel A ?

 If I have an instance of the page, then I can do a *get(id of panel B)* to
 get the instance of panel B
 But how do I get the instance of the home page in panel A ?

 How can I acheive this scenarion in the best possible way?

 Can someone please help me as I have lot of cases with these scenarious ?




 Regards,
 Arun Wagle


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]