Basically the list view depend from List interface due some calls to his
get(index) method. It means that the order of the components on the
collections, are meaninful to the component. If it is not your case (order,
item indexes doesn't matters), you can use an wrapper model in an list view,
like:
WrapperModel implements IModel
{
public WrapperModel (IModel wrappedModel)
{
this.wrappedModel = wrappedModel;
}
public Object getObject()
{
return new ArrayList(wrappedModel.getObject());
}
}
then you can create an list view like:
new ListView("id", new PropertyModel(bean, "listPropertyFromThatBean"))
On Mon, Jan 25, 2010 at 12:29 PM, Sam Barrow <[email protected]> wrote:
> I've noticed in some places where generics wildcards may be useful that
> they are not used. For example, in IColumn.
> If I have a Type and a SubType that extends Type, I can't use
> IColumn<Type> in a DataTable<SubType>. Is there any reason for this or
> was it just not implemented? Not the most necessary feature, but it
> couldn't hurt.
>
> Also is there a reason ListView and similar components require an
> IModel<List>, and will not accept an IModel<Collection>?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Pedro Henrique Oliveira dos Santos