As a followup to this, I think getPage() is only legal once the
component has been add()ed into the Page. Makes sense (although it
should be documented in the Javadoc that null will be returned under
this condition).
I guess one should never configuring any rendering-related
items in the component constructor and instead lazily initialize them
in the onRender() method. Is that the appropriate behavior? In my case
I am trying to cache images of round corners in the Application. I
created a Map where the key consists of the page's class (type) and the
component name. So for example, I'd have mapping of this code:
[HomePage + "topLeftCorner", <cached image>]
Gili
On Sun, 13 Mar 2005 13:57:24 -0500, Gili wrote:
>
> Component.getPage() is failing with:
>
>throw new IllegalStateException("No Page found for component " + this);
>
> and it is not clear from the Javadoc under which conditions
>this occurs. When is it legal for me to call this method?
>
>Gili
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop