You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by gv...@apache.org on 2005/11/05 06:02:17 UTC

svn commit: r330972 - /struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java

Author: gvanmatre
Date: Fri Nov  4 21:02:06 2005
New Revision: 330972

URL: http://svn.apache.org/viewcvs?rev=330972&view=rev
Log:
Changed svn properties

Modified:
    struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java   (contents, props changed)

Modified: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java?rev=330972&r1=330971&r2=330972&view=diff
==============================================================================
--- struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java (original)
+++ struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java Fri Nov  4 21:02:06 2005
@@ -1,118 +1,118 @@
-/*
- * Copyright 2004-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.apache.shale.clay.taglib;
-
-import javax.faces.component.UIComponent;
-import javax.faces.webapp.UIComponentTag;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.tagext.TagSupport;
-
-import org.apache.shale.clay.component.Clay;
-import org.apache.shale.util.Messages;
-
-/**
- * <p>This Tag is used to add replacement symbols to the {@link Clay} component.  
- * Replacement symbols are substituted within the meta-data used to build the subtree 
- * under the Clay component.  This tag is similar to the standard JSF attribute tag.  
- * The <code>name</code> attribute will be prepended with an '@' character.  
- * The "at" character is the symbol identifier.</p>
- */
-public class SymbolTag extends TagSupport {
-
-    private static final long serialVersionUID = 3977021747121698357L;
-
-    /**
-     * <p>Message resources for this class.</p>
-     */
-    private static Messages messages = new Messages(
-            "org.apache.shale.clay.Bundle", Clay.class.getClassLoader());
-    
-    /**
-     * <p>The <code>name</code> of the symbol.</p>
-     */
-    private String name = null;
-    
-    /**
-     * <p>The <code>value</code> of the symbol.</p>
-     */
-    private String value = null;
-    
-    /**
-     * <p>Returns the name of the symbol.</p>
-     */
-    public String getName() {
-        return name;
-    }
-    
-
-    /**
-     * <p>Sets the <code>name</code> of the symbol.</p>
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-    
-
-    /**
-     * <p>Returns the value for the symbol.</p>
-     */
-    public String getValue() {
-        return value;
-    }
-    
-
-    /**
-     * <p>Sets the <code>value</code> for the symbol.</p>
-     */
-    public void setValue(String value) {
-        this.value = value;
-    }
-    
-
-    /**
-     * <p>Finds the parent component and adds the symbol to the 
-     * Clay component's symbol table.  The parent has to be a {@link Clay} component.
-     * </p>
-     */
-    public int doStartTag() throws JspException {
-          UIComponentTag parentTag = UIComponentTag.getParentUIComponentTag(pageContext);
-          if (parentTag == null) {
-             throw new JspException(messages.getMessage("clayparent.notfound"));    
-          }
-          
-          UIComponent parentComponent = parentTag.getComponentInstance();
-          if (parentComponent == null) {
-              throw new JspException(messages.getMessage("clayparent.notfound"));                        
-          } 
-          
-          if (!(parentComponent instanceof Clay)) {
-              throw new JspException(messages.getMessage("clayparent.notfound"));                                      
-          }
-
-          Clay clayParent = (Clay) parentComponent;
-
-          StringBuffer tmp = new StringBuffer(name);
-          if (tmp.charAt(0) != '@')
-            tmp.insert(0, '@');
-          
-          clayParent.getSymbols().put(tmp.toString(), value);          
-          
-          return super.doStartTag();
-    
-    }
-
-   
-}
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.apache.shale.clay.taglib;
+
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.apache.shale.clay.component.Clay;
+import org.apache.shale.util.Messages;
+
+/**
+ * <p>This Tag is used to add replacement symbols to the {@link Clay} component.  
+ * Replacement symbols are substituted within the meta-data used to build the subtree 
+ * under the Clay component.  This tag is similar to the standard JSF attribute tag.  
+ * The <code>name</code> attribute will be prepended with an '@' character.  
+ * The "at" character is the symbol identifier.</p>
+ */
+public class SymbolTag extends TagSupport {
+
+    private static final long serialVersionUID = 3977021747121698357L;
+
+    /**
+     * <p>Message resources for this class.</p>
+     */
+    private static Messages messages = new Messages(
+            "org.apache.shale.clay.Bundle", Clay.class.getClassLoader());
+    
+    /**
+     * <p>The <code>name</code> of the symbol.</p>
+     */
+    private String name = null;
+    
+    /**
+     * <p>The <code>value</code> of the symbol.</p>
+     */
+    private String value = null;
+    
+    /**
+     * <p>Returns the name of the symbol.</p>
+     */
+    public String getName() {
+        return name;
+    }
+    
+
+    /**
+     * <p>Sets the <code>name</code> of the symbol.</p>
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+    
+
+    /**
+     * <p>Returns the value for the symbol.</p>
+     */
+    public String getValue() {
+        return value;
+    }
+    
+
+    /**
+     * <p>Sets the <code>value</code> for the symbol.</p>
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+    
+
+    /**
+     * <p>Finds the parent component and adds the symbol to the 
+     * Clay component's symbol table.  The parent has to be a {@link Clay} component.
+     * </p>
+     */
+    public int doStartTag() throws JspException {
+          UIComponentTag parentTag = UIComponentTag.getParentUIComponentTag(pageContext);
+          if (parentTag == null) {
+             throw new JspException(messages.getMessage("clayparent.notfound"));    
+          }
+          
+          UIComponent parentComponent = parentTag.getComponentInstance();
+          if (parentComponent == null) {
+              throw new JspException(messages.getMessage("clayparent.notfound"));                        
+          } 
+          
+          if (!(parentComponent instanceof Clay)) {
+              throw new JspException(messages.getMessage("clayparent.notfound"));                                      
+          }
+
+          Clay clayParent = (Clay) parentComponent;
+
+          StringBuffer tmp = new StringBuffer(name);
+          if (tmp.charAt(0) != '@')
+            tmp.insert(0, '@');
+          
+          clayParent.getSymbols().put(tmp.toString(), value);          
+          
+          return super.doStartTag();
+    
+    }
+
+   
+}

Propchange: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: struts/shale/trunk/clay-plugin/src/java/org/apache/shale/clay/taglib/SymbolTag.java
------------------------------------------------------------------------------
    svn:keywords = date author id rev



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org