AbstractReadOnlyModel<Point> point = new AbstractReadOnlyModel() { ...
return point from your service ... }

PropertyModel<Double> lat = new PropertyModel<Double>(point, "latitude");
PropertyModel<Double> lng = new PropertyModel<Double>(point, "longitude");
Label latLabel = new Label("lat", lat);
Label lngLabel = new Label("lng", lng);


--
Jeremy Thomerson
http://www.wickettraining.com



2009/10/7 zabian <zabia...@gmail.com>

> 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