Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-501

custom tag 'IfExisting' and 'IfNotExisting'

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • 2.1 Final
    • 2.1 Final
    • taglibs
    • None
    • all

      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>

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              aemi Michael Aemisegger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: