[MAGNOLIA-501] custom tag 'IfExisting' and 'IfNotExisting' Created: 24/Jul/05  Updated: 17/Mar/09  Resolved: 26/Jul/05

Status: Closed
Project: Magnolia
Component/s: taglibs
Affects Version/s: 2.1 Final
Fix Version/s: 2.1 Final

Type: New Feature Priority: Major
Reporter: Michael Aemisegger Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

all


Attachments: Java Source File IfExisting.java     Java Source File IfNotExisting.java    
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

The custom tags IfEmpty and IfNotEmpty are very slow when evaluating binary data. Because these tags load the binary data into memory they also consum a lot of resources. This effect is severed with increasing sizes of binary data.

The attached custom tag java classes check only for existence of nodes and therefore are much faster and less resource hungry.

The taglib definition snippets are:

<tag>
<name>ifNotExisting</name>
<tag-class>info.magnolia.cms.taglibs.IfNotExisting</tag-class>
<body-content>JSP</body-content>
<description>
evaluates the body only if a container and / or the corresponding atom does not exist
</description>
<attribute>
<name>nodeDataName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>atomName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeCollectionName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>actpage</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
<description></description>
</attribute>
</tag>
<tag>
<name>ifExisting</name>
<tag-class>info.magnolia.cms.taglibs.IfExisting</tag-class>
<body-content>JSP</body-content>
<description>this is exactly the opposite of the ifNotExisting Tag</description>
<attribute>
<name>nodeDataName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>atomName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>contentNodeCollectionName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description></description>
</attribute>
<attribute>
<name>actpage</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
<description></description>
</attribute>
</tag>



 Comments   
Comment by Philipp Bracher [ 25/Jul/05 ]

commited.

Thanks

Comment by Boris Kraft [ 26/Jul/05 ]

reassigned to RC3

Generated at Mon Feb 12 03:18:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.