Author: xlawrence
Date: Tue Nov 13 15:31:38 2007
New Revision: 19136

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19136&repname=
=3Djahia
Log:
first version of the AbstractJahiaTag

Added:
    branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/Abstr=
actJahiaTag.java

Added: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/Ab=
stractJahiaTag.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/AbstractJahiaTag.java&r=
ev=3D19136&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/Abstr=
actJahiaTag.java (added)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/taglibs/Abstr=
actJahiaTag.java Tue Nov 13 15:31:38 2007
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2002-2006 Jahia Ltd
+ *
+ * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (J=
CDDL),
+ * Version 1.0 (the "License"), or (at your option) any later version; you=
 may
+ * not use this file except in compliance with the License. You should have
+ * received a copy of the License along with this program; if not, you may=
 obtain
+ * a copy of the License at
+ *
+ *  http://www.jahia.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jahia.taglibs;
+
+import javax.servlet.jsp.tagext.TagSupport;
+
+/**
+ * This abstract Tag is the starting point for implementing any knew tags.=
 In contains common attributes that should be
+ * used in the implementation of the derived tags. For instance, the 'xhtm=
lCompliantHtml' is used to know if the tag
+ * should render XHTML compliant html or simple basic html.</br>
+ * The same is true regarding the 'resourceBundle' attribute. Instead of h=
aving to set the name of the resource bundle
+ * file for all jahia tags, it is much more convenient to set it once, at =
the beginning of the template, and then simply
+ * fetching this set values.
+ *
+ * @author Xavier Lawrence
+ */
+public class AbstractJahiaTag extends TagSupport {
+    /**
+     * Name of the resourceBundle all tags derived from this class will us=
e.
+     */
+    protected String resourceBundle;
+
+    /**
+     * If set to 'true' the output generated by the tag will be XHTML comp=
liant, otherwise it will be
+     * HTML compliant
+     */
+    protected boolean xhtmlCompliantHtml;
+
+    /**
+     * The languageCode attribute keeps track of the current language
+     */
+    protected String languageCode;
+
+    public String getResourceBundle() {
+        return resourceBundle;
+    }
+
+    public void setResourceBundle(String resourceBundle) {
+        this.resourceBundle =3D resourceBundle;
+    }
+
+    public boolean isXhtmlCompliantHtml() {
+        return xhtmlCompliantHtml;
+    }
+
+    public void setXhtmlCompliantHtml(boolean xhtmlCompliantHtml) {
+        this.xhtmlCompliantHtml =3D xhtmlCompliantHtml;
+    }
+
+    public String getLanguageCode() {
+        return languageCode;
+    }
+
+    public void setLanguageCode(String languageCode) {
+        this.languageCode =3D languageCode;
+    }
+}

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to