KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > aliasbean > AliasBeanTag


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.custom.aliasbean;
17
18 import javax.faces.component.UIComponent;
19
20 import org.apache.myfaces.taglib.UIComponentTagBase;
21
22 /**
23  * @author Sylvain Vieujot (latest modification by $Author: matzew $)
24  * @version $Revision: 1.5 $ $Date: 2005/02/18 17:19:30 $
25  * $Log: AliasBeanTag.java,v $
26  * Revision 1.5 2005/02/18 17:19:30 matzew
27  * added release() to tag clazzes.
28  *
29  * Revision 1.4 2005/01/27 01:59:45 svieujot
30  * AliasBean : Change sourceBean attribute for value.
31  * Make it work with both beans references ( #{myBean} ), and fix strings as value.
32  * Document tld.
33  *
34  * Revision 1.3 2004/11/23 11:03:35 svieujot
35  * Get ride of the x:aliasBean "permanent" attribute.
36  *
37  * Revision 1.2 2004/11/23 04:46:40 svieujot
38  * Add an ugly "permanent" tag to x:aliasBean to handle children events.
39  *
40  * Revision 1.1 2004/11/08 20:43:15 svieujot
41  * Add an x:aliasBean component
42  *
43  */

44 public class AliasBeanTag extends UIComponentTagBase {
45
46     private String JavaDoc _alias;
47     private String JavaDoc _valueExpression;
48     
49     public void release() {
50         super.release();
51
52         _alias=null;
53         _valueExpression=null;
54
55     }
56     
57     protected void setProperties(UIComponent component) {
58         super.setProperties(component);
59
60         setStringProperty(component, "alias", _alias);
61         setStringProperty(component, "value", _valueExpression);
62     }
63     
64     public String JavaDoc getComponentType() {
65         return AliasBean.COMPONENT_TYPE;
66     }
67
68     public String JavaDoc getRendererType() {
69         return null;
70     }
71     
72     public void setAlias(String JavaDoc alias){
73         _alias = alias;
74     }
75     
76     public void setValue(String JavaDoc valueExpression){
77         _valueExpression = valueExpression;
78     }
79 }
Popular Tags