Created
June 1, 2014 10:23
-
-
Save wmfairuz/7bf54fb1aa77af9fae4e to your computer and use it in GitHub Desktop.
custom taglib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
example: | |
A Java file: src/main/java/org/jahia/modules/survey/taglib/FormFunctions.java | |
Declare taglib in TLD: src/main/resources/META-INF/jahia-survey.tld | |
<description>Jahia Survey module tag library</description> | |
<display-name>Jahia Survey Service</display-name> | |
<tlib-version>1.0-SNAPSHOT</tlib-version> | |
<short-name>survey</short-name> | |
<uri>http://www.jahia.org/tags/survey</uri> | |
<function> | |
<name>getFormFields</name> | |
<function-class>org.jahia.modules.survey.taglib.FormFunctions</function-class> | |
<function-signature>java.util.Map getFormFields(org.jahia.services.content.JCRNodeWrapper)</function-signature> | |
</function> | |
Use in jsp: | |
<%@ taglib prefix="survey" uri="http://www.jahia.org/tags/survey" %> | |
<c:set value="${survey:getFormFields(currentNode.parent)}" var="formFields" scope="request"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment