Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: renderkits/taglib/xul/PanelGroupTag.java


1   /*
2    * The contents of this file are subject to the terms
3    * of the Common Development and Distribution License
4    * (the License). You may not use this file except in
5    * compliance with the License.
6    * 
7    * You can obtain a copy of the License at
8    * https://javaserverfaces.dev.java.net/CDDL.html or
9    * legal/CDDLv1.0.txt. 
10   * See the License for the specific language governing
11   * permission and limitations under the License.
12   * 
13   * When distributing Covered Code, include this CDDL
14   * Header Notice in each file and include the License file
15   * at legal/CDDLv1.0.txt.    
16   * If applicable, add the following below the CDDL Header,
17   * with the fields enclosed by brackets [] replaced by
18   * your own identifying information:
19   * "Portions Copyrighted [year] [name of copyright owner]"
20   * 
21   * [Name of File] [ver.__] [Date]
22   * 
23   * Copyright 2005 Sun Microsystems Inc. All Rights Reserved
24   */
25  
26  package renderkits.taglib.xul;
27  
28  import javax.faces.component.UIComponent;
29  import javax.faces.webapp.UIComponentELTag;
30  import javax.servlet.jsp.JspException;
31  
32  /*
33  * ******* GENERATED CODE - DO NOT EDIT *******
34  */
35  
36  
37  public final class PanelGroupTag extends UIComponentELTag {
38  
39  
40      // PROPERTY: captionClass 
41      private javax.el.ValueExpression captionClass;
42  
43      public void setCaptionClass(javax.el.ValueExpression captionClass) {
44          this.captionClass = captionClass;
45      }
46  
47      // PROPERTY: captionLabel 
48      private javax.el.ValueExpression captionLabel;
49  
50      public void setCaptionLabel(javax.el.ValueExpression captionLabel) {
51          this.captionLabel = captionLabel;
52      }
53  
54      // PROPERTY: style
55      private javax.el.ValueExpression style;
56  
57      public void setStyle(javax.el.ValueExpression style) {
58          this.style = style;
59      }
60  
61      // PROPERTY: styleClass
62      private javax.el.ValueExpression styleClass;
63  
64      public void setStyleClass(javax.el.ValueExpression styleClass) {
65          this.styleClass = styleClass;
66      }
67  
68  
69      // General Methods
70      public String getRendererType() {
71          return "renderkit.xul.Group";
72      }
73  
74      public String getComponentType() {
75          return "javax.faces.Panel";
76      }
77  
78      protected void setProperties(UIComponent component) {
79          super.setProperties(component);
80          javax.faces.component.UIPanel panel = null;
81          try {
82              panel = (javax.faces.component.UIPanel) component;
83          } catch (ClassCastException cce) {
84              throw new IllegalStateException("Component "
85                                              + component.toString()
86                                              + " not expected type.  Expected: javax.faces.component.UIPanel.  Perhaps you're missing a tag?");
87          }
88  
89          if (captionClass != null) {
90              if (!captionClass.isLiteralText()) {
91                  panel.setValueExpression("captionClass", captionClass);
92              } else {
93                  panel.getAttributes()
94                        .put("captionClass", captionClass.getExpressionString());
95              }
96          }
97          if (captionLabel != null) {
98              if (!captionLabel.isLiteralText()) {
99                  panel.setValueExpression("captionLabel", captionLabel);
100             } else {
101                 panel.getAttributes()
102                       .put("captionLabel", captionLabel.getExpressionString());
103             }
104         }
105         if (style != null) {
106             if (!style.isLiteralText()) {
107                 panel.setValueExpression("style", style);
108             } else {
109                 panel.getAttributes().put("style", style.getExpressionString());
110             }
111         }
112         if (styleClass != null) {
113             if (!styleClass.isLiteralText()) {
114                 panel.setValueExpression("styleClass", styleClass);
115             } else {
116                 panel.getAttributes()
117                       .put("styleClass", styleClass.getExpressionString());
118             }
119         }
120     }
121 
122     // Methods From TagSupport
123     public int doStartTag() throws JspException {
124         try {
125             return super.doStartTag();
126         } catch (Exception e) {
127             Throwable root = e;
128             while (root.getCause() != null) {
129                 root = root.getCause();
130             }
131             throw new JspException(root);
132         }
133     }
134 
135     public int doEndTag() throws JspException {
136         try {
137             return super.doEndTag();
138         } catch (Exception e) {
139             Throwable root = e;
140             while (root.getCause() != null) {
141                 root = root.getCause();
142             }
143             throw new JspException(root);
144         }
145     }
146 
147     // RELEASE
148     public void release() {
149         super.release();
150 
151         // component properties
152 
153         // rendered attributes
154         this.captionClass = null;
155         this.captionLabel = null;
156         this.style = null;
157         this.styleClass = null;
158     }
159 
160     public String getDebugString() {
161         String result =
162               "id: " + this.getId() + " class: " + this.getClass().getName();
163         return result;
164     }
165 }