Hi,

First I want to thank the Wicket team for this great framework. It is realy the most simple and still powerful one I know.

I want to create a weather box as a Panel, where the user can select his town. When the panel is placed on different Pages it should behave like it was the same instance. Ie if the user selects weather vor Vienna on the Home page than the panel should also show on the HotelBooking page the weather of Vienna.

My dream solution would be if I could create the Panel instance in the Session and reuse the same instance on different Pages. However I think this is not possible, is it?

My next solution is to declare a shared model holding the selected town. The app-author using the panel has than to declare it in a custom Session and give it to each Panel instances on creation. However I am not realy satisfied with this approach, because it makes the usage of the panel harder, polutes the Session, the weather panel has to make an unsave cast of the Session and it IMO breaks encapsulation. The app-author should not be concerned with how the town is stored and shared between the insances of the same class.

What I would need is some sort of (private) static session or static application scoped model holder. Is there something like this in the api?

I was looking for something on Component like
protected Serializable getSharedSessionModel(Class declaringCl)
protected void setSharedSessionModel(Class declaringCl,Serializable model)

where the Class paramter is needed that extending components do not override the model of the parent.


I think such a thing could be useful for a number of different 'portlets' like stock-tickers, shopping-baskets, mail-notification voting-boxes etc.

Thanks,
Christian
--
Christian Essl
        

        
                
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to