item.setModel(....) I suppose?
On 4/2/08, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> It should be:
>
> protected void populateItem(Item item)
> {
>
> item.setModelObject(new CompoundPropertyModel(item.getModel()));
> .....
> }
>
>
> Maurice
>
>
> On Wed, Apr 2, 2008 at 1:23 PM, Java Programmer <[EMAIL PROTECTED]> wrote:
> > I have narrowed my code to:
> >
> > protected void populateItem(Item item) {
> >
> > final CarPart carPart = (CarPart) item.getModelObject();
> >
> > item.setModelObject(new CompoundPropertyModel(carPart));
> > item.add(description = new MultiLineLabel(DESCRIPTION));
> > }
> > and get error about using read only model:
> > java.lang.UnsupportedOperationException: Model class
> > parts.car.wicket.models.CarPartDetachableModel does not support
> > setObject(Object)
> > at
> org.apache.wicket.model.AbstractReadOnlyModel.setObject(AbstractReadOnlyModel.java:52)
> > What model could I use instead of LoadableDetachedModel?
> >
> >
> >
> > Regards,
> > Adr
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]