Expanding a Collection by default

Nov 30, 2012 at 10:24 AM


I'm wondering if it is possible to expand a collection in the UI when the page loads?

i.e An object has a collection of objects and we would like to have these automatically expanded so that the user does not need to click the table/list icons to see the collection contents.

Many thanks,


Nov 30, 2012 at 10:33 AM

You can certainly do that with a custom view, but I would tend to discourage it generically.  One of the reasons for loading the page with collections closed was to reduce the number of database hits.  Its the kind of thing I would tend to optimise and fiddle with towards the end of a project, not near the start.

Nov 30, 2012 at 10:39 AM
Hmmm, not sure I agree. This is actually a feature that we added to Apache Isis recently, and it definitely makes the app feels more usable; see the screenshot ... the Units and CommunicationChannels are resolved by default, the Actors collection is not [1].

I agree that there is an impact on the database, but if the user is more-likely-than-not going to open that collection up anyway, it actually reduces the load.

FWIW, the way we implemented this in Isis was by introducing a new @Resolve annotation, eg:

@MemberOrder(sequence = "2.2")
public List<Unit> getUnits() {
return units;

The values for the Type are EAGERLY and LAZILY, with LAZILY being the default. And we chose the name @Resolve to remind ourselves that we were asking the object store to do additional work.


Nov 30, 2012 at 12:25 PM
>FWIW, the way we implemented this in Isis was by introducing a new @Resolve annotation, eg:
I like that optional control.