isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict Jabines <>
Subject View Model has List of domain object
Date Thu, 09 Nov 2017 17:01:45 GMT

I have tried to create a view model which has a property domainObjects,
which is a List<DomainObject>. Now, in code the Menu instantiate the View
Model and add something to the list of domain object, but when the program
runs and I call on the method on the menu, it returns the view model but
the List is empty.
I look at the simple app archetype, the HomePageViewModel's getObjects()
calls the repo and return whatever the repo returns.

public List<SimpleObject> getObjects() {
    return simpleObjectRepository.listAll();
Is it not allowed to add the collection inside Menu?
Is there something I did not understand about the View Model?

- Paul


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