Hi Wojtek,

Create a panel that contains the setup to present the properties of your Point class.

Add the 'AjaxSelfUpdatingTimerBehavior' to the panel.

So long as the PointPanel is setup properly using an IModel<Point> implementation that knows how to populate itself and the nested fields there is nothing else you need to do.

It sounds like you don't have the panel without the ajax working. You should look at the CompoundPropertyModel or build a custom IModel implementation to allow you to access the fields of the Point object.

See the wiki for more examples: http://cwiki.apache.org/WICKET/working-with-wicket-models.html

Mike

Hi,
I want to add self-updating panel which displays some nested properties ie. two coordinates (x,y - let's say the Point class object).
The point is updated by ejb or webservice.

I tried to use the example from wicket-examples page - clock using AjaxSelfUpdatingBehavior. But example case updates just one value, so the model is easy - AbstractReadOnlyModel<String>. My case is similar, I could use AbstractReadOnlyModel<Point> which getObject() calls my ejb or webservice and returns the Point object. The problem is how to populate nested properties to the Labels on each update of AjaxSelfUpdatingBehavior.

I'm still fresh to the models, could anybody help me?

Regards,
Wojtek





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


Reply via email to