I'd solve it with a custom model:

IModel<List<A>> listModel = new LoadableDetachableModel() {
    protected List<A> load() {
        List<A> as = new ArrayList<>();

        as.addAll(method.retrieveAlist());

        as.add(...);

        return as;
    }
});

Positive side effect: The list of object is not kept in the session and always up-to-date.

Have fun
Sven


On 17.04.2015 01:50, Chris wrote:
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: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to