AjaxSelfUpdatingBehavior and nested values updating

2009-10-07 Thread zabian
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

Re: AjaxSelfUpdatingBehavior and nested values updating

2009-10-07 Thread Michael O'Cleirigh
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 IModelPoint implementation that knows how to populate itself and the nested fields

Re: AjaxSelfUpdatingBehavior and nested values updating

2009-10-07 Thread Jeremy Thomerson
AbstractReadOnlyModelPoint point = new AbstractReadOnlyModel() { ... return point from your service ... } PropertyModelDouble lat = new PropertyModelDouble(point, latitude); PropertyModelDouble lng = new PropertyModelDouble(point, longitude); Label latLabel = new Label(lat, lat); Label lngLabel =

Re: AjaxSelfUpdatingBehavior and nested values updating

2009-10-07 Thread Jeremy Thomerson
Oh, then just add the panel that contains those labels, or add the labels themselves, to the ajax response (target.addComponent) -- Jeremy Thomerson http://www.wickettraining.com On Wed, Oct 7, 2009 at 10:00 AM, Jeremy Thomerson jer...@wickettraining.com wrote: AbstractReadOnlyModelPoint

Re: AjaxSelfUpdatingBehavior and nested values updating

2009-10-07 Thread zabian
Great, this is exactly what i need. I just didn't know how to convert one model to another or that you can get property of model object directly from model :) I appreciate your commitment. Regards, Wojtek Jeremy Thomerson pisze: AbstractReadOnlyModelPoint point = new