Hi,
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
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>