The solution was writing a template model:

[code]
public class MyModel extends RenderingModelImpl<RenderableDefinition> {
...
    public List<String> getListItems() throws RepositoryException {
        List<String> items = new ArrayList<String>();
        Object object = super.getContent().get("items");
        if (object == null) {
                return items;
        }       
        ContentMap map = (ContentMap)object;
        PropertyIterator propertyIterator = map.getJCRNode().getProperties();
                
        while (propertyIterator.hasNext()) {
            Property property = (Property) propertyIterator.next();
            try {
                if (!property.getName().startsWith("jcr:") && 
!property.getName().startsWith("mgnl:") && !property.isMultiple()) {
                        items.add(property.getString());
                }
            } catch (Exception e) {
                ...
            }
        }               
        return items;
    }
}
...
}
[/code]

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=6d8b965e-71c9-477f-81f1-a886fc37c3e3


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to