wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francois Meillet <francois.meil...@gmail.com>
Subject Re: Wicket Listmodel (attach objects to model but not to list)
Date Fri, 17 Apr 2015 05:13:25 GMT
It's not possible.

Look at the ListModel's consructor.
	
public ListModel(List<T> list)
{
	setObject(list);
}
	
And the setObject() method implementation, which is in the superclass, is

@Override
public void setObject(T object)
{
	if (!(object instanceof Serializable))
	{
		object = createSerializableVersionOf(object);
	}
	this.object = object;
}



François Meillet





Le 17 avr. 2015 à 01:50, Chris <chris.gr@gmx.at> a écrit :

> Hi all,
> 
> I have a listmodel:
> 
>      IModel<List<A>> listModel = new ListModel<List<A>>(method.retrieveAlist());
> 
> Is it possible to feed the model from the original list but add additional elements of
type A to the model only, without being mapped back to the list?
> 
> thanks a lot,
> Chris
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message