Another chapter to this book.
I have a decoration in place. As test condition on a Node, I see the presence 
of a property (test) to be evaluated as "true".

I check the "visibility" of a node in Decorator class: 

[code]public class PropertiesContentDecorator extends AbstractContentDecorator {

        @Override
        public boolean evaluateNode(Node node) {

                final String test = PropertyUtil.getString(node, "test", "");
                return StringUtils.isEmpty(test);

        }

}[/code]

Enabling this, nodes with property "test" = "true" are hidden from Page app. 
For instance, /demo-project/service/dummy-events/another-event-9 is hidden. 
Excellent.
But..

http://demo.magnolia-cms.com/demo-project/news-and-events/content/0.html

The event-9 is still there.
The reason is in the model class. EventsListModel calls ... that calls ... that 
calls TemplateCategoryUtil.
In method getWrappedNodesFromQuery, I've found this line: 

[code]while (items.hasNext() && count <= maxResultSize) {
   itemsListFromQuery.add(new HTMLEscapingNodeWrapper(new 
I18nNodeWrapper(items.nextNode()), false));
   count++;
}[/code]

I guess that I am missing something again. 
A) Why query manager still returns my "hidden" node? 
B) And why that node is not automatically wrapped in I18nNodeWrapper and 
HTMLEscapingNodeWrapper, but the model class forces this wrapping?

about (A): should I override more methods (which?) to avoid this issue?

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=0f30a282-75c7-42ed-a73c-9379248d173b


----------------------------------------------------------------
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