isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik de Hair <>
Subject Replacing Wicket page elements in 1.12.x
Date Wed, 04 May 2016 15:37:34 GMT

In Apache Isis 1.11.x we replaced the collection contents component so 
we could use another kind of repeating view [1] depending on the entity 
type contained in a collection.

In 1.12.x it looks like the EntityCollectionPanel isn't created by a 
(overrideable) factory anymore but is created by a direct call for the 
constructor of the EntityCollectionPanel in the Col-class. To get the 
same results as we had before, we now have to do something like this in 
the buildGui()-method of Col (after copying the class to our webapp):

for(CollectionLayoutData collection : collections) {

     finalString id = collectionRv.newChildId();
     finalEntityModel entityModelWithHints = getModel().cloneWithLayoutMetadata(collection);

     if(entityModelWithHints.getObject().getObject()instanceofSearchResultsPage) {
         finalSearchResultsCollectionContentsPanel collectionPanel =newSearchResultsCollectionContentsPanel(id,
         finalEntityCollectionPanel collectionPanel =newEntityCollectionPanel(id, entityModelWithHints);

Is this the only way to do this (right now) or is there some more 
dynamic way?



View raw message