Re: How to get a reference to the holding page from a panel

2009-02-15 Thread Timo Rantalaiho
On Fri, 13 Feb 2009, Warren Bell wrote:
 I have a simmilar situation where I want to put a panel nested in a 
 panel nested in a page. The panel that is nested in the page stays the 
 same for many different pages, but the panel nested into the panel 
 changes. Would you do an anonymous panel class within an anonymous panel 
 class within the page so that you can do the same type of referencing 
 MyPage.this? Or is there a better way of doing this?

It sounds like a design that could be improved if you need
a reference to the page. What are you trying to achieve?

Best wishes,
Timo


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



Re: How to get a reference to the holding page from a panel

2009-02-15 Thread Igor Vaynberg
he said he wanted a compile time reference. if you are ok with a
runtime reference, then getpage() will do.

-igor

On Fri, Feb 13, 2009 at 2:54 PM, Warren Bell warrenbe...@gmail.com wrote:
 I have a simmilar situation where I want to put a panel nested in a panel
 nested in a page. The panel that is nested in the page stays the same for
 many different pages, but the panel nested into the panel changes. Would you
 do an anonymous panel class within an anonymous panel class within the page
 so that you can do the same type of referencing MyPage.this? Or is there a
 better way of doing this?

 Actually I also find that using getPage() on beforeRender() to get the
 page
 is ok as long as do deal with any problems in case you cannot get the
 page.

 Pieter

 On Fri, Feb 13, 2009 at 6:34 PM, Igor Vaynberg
 igor.vaynb...@gmail.comwrote:

 make the panel an anonymous or inner class of the page and use
 MyPage.this.

 -igor

 On Fri, Feb 13, 2009 at 6:14 AM, pieter claassen pie...@claassen.co.uk
 wrote:

 Is there a simple answer for how to get a reference from a panel to the
 holding page that is available at compile time (something other than
 getPage() on beforeRender())?

 Thanks,
 Pieter

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





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



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



How to get a reference to the holding page from a panel

2009-02-13 Thread pieter claassen
Is there a simple answer for how to get a reference from a panel to the
holding page that is available at compile time (something other than
getPage() on beforeRender())?

Thanks,
Pieter


Re: How to get a reference to the holding page from a panel

2009-02-13 Thread Igor Vaynberg
make the panel an anonymous or inner class of the page and use MyPage.this.

-igor

On Fri, Feb 13, 2009 at 6:14 AM, pieter claassen pie...@claassen.co.uk wrote:
 Is there a simple answer for how to get a reference from a panel to the
 holding page that is available at compile time (something other than
 getPage() on beforeRender())?

 Thanks,
 Pieter


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



Re: How to get a reference to the holding page from a panel

2009-02-13 Thread pieter claassen
Actually I also find that using getPage() on beforeRender() to get the page
is ok as long as do deal with any problems in case you cannot get the page.

Pieter

On Fri, Feb 13, 2009 at 6:34 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 make the panel an anonymous or inner class of the page and use MyPage.this.

 -igor

 On Fri, Feb 13, 2009 at 6:14 AM, pieter claassen pie...@claassen.co.uk
 wrote:
  Is there a simple answer for how to get a reference from a panel to the
  holding page that is available at compile time (something other than
  getPage() on beforeRender())?
 
  Thanks,
  Pieter
 

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




Re: How to get a reference to the holding page from a panel

2009-02-13 Thread Warren Bell
I have a simmilar situation where I want to put a panel nested in a 
panel nested in a page. The panel that is nested in the page stays the 
same for many different pages, but the panel nested into the panel 
changes. Would you do an anonymous panel class within an anonymous panel 
class within the page so that you can do the same type of referencing 
MyPage.this? Or is there a better way of doing this?
Actually I also find that using getPage() on beforeRender() to get the 
page
is ok as long as do deal with any problems in case you cannot get the 
page.


Pieter

On Fri, Feb 13, 2009 at 6:34 PM, Igor Vaynberg 
igor.vaynb...@gmail.comwrote:


make the panel an anonymous or inner class of the page and use 
MyPage.this.


-igor

On Fri, Feb 13, 2009 at 6:14 AM, pieter claassen pie...@claassen.co.uk
wrote:

Is there a simple answer for how to get a reference from a panel to the
holding page that is available at compile time (something other than
getPage() on beforeRender())?

Thanks,
Pieter


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







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