KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > wap > def > CommandLink


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.wap.def;
17
18 /**
19  * Render an WML "a" anchor element that acts like a form submit button when clicked.
20  * This element must be a childern of UIForm component.
21  *
22  * Decode Behavior
23  * Obtain the Map from the "requestParameterMap" property of the ExternalContext. If the value in theMap for
24  * the value of the "clientId" property of the component is not null, get the value of the "type" attribute,
25  * and convert it to lower case. If the result is equal to the String "reset" (without the quotes), return fromdecode().
26  * Otherwise, create ajavax.faces.event.ActionEvent around the component, and pass it to the queueEvent() method
27  * of the component, which must be an instance ofUICommand.
28  *
29  * Encode Behavior
30  * Wml don't contain submit button tag. This element is rendered using "do" and "go" wml tags.
31  *
32  * @wapfaces.tag
33  * componentFamily="UICommand"
34  * rendererType="CommandLinkRenderer"
35  * tagName="commandLink"
36  * tagBaseClass="org.apache.myfaces.wap.base.ActionSourceTagBase"
37  * bodyContent="JSP"
38  *
39  * @author <a HREF="mailto:Jiri.Zaloudek@ivancice.cz">Jiri Zaloudek</a> (latest modification by $Author: matzew $)
40  * @version $Revision: 1.1 $ $Date: 2004/12/30 09:37:25 $
41  * $Log: CommandLink.java,v $
42  * Revision 1.1 2004/12/30 09:37:25 matzew
43  * added a new RenderKit for WML. Thanks to Jirí Žaloudek
44  *
45  */

46
47
48 public class CommandLink extends javax.faces.component.UICommand {
49     
50     /**
51      * Defines a text identifying the link.
52      *
53      * @wapfaces.attribute
54      * valueBinding="true"
55      */

56     java.lang.String JavaDoc title;
57         
58     /**
59      * The xml:lang attribute specifies the natural or formal language of an element or its attributes.
60      *
61      * @wapfaces.attribute
62      * valueBinding="true"
63      */

64     java.lang.String JavaDoc xmllang;
65     
66     /**
67      * Space-separated list of style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.
68      *
69      * @wapfaces.attribute
70      * valueBinding="true"
71      */

72     java.lang.String JavaDoc styleClass;
73     
74     // ============= ABSTARACT ATTRIBUTES ======================================
75
/**
76      * MethodBinding representing the application action to invoke when this component is activated by the user. The expression must evaluate to a public method that takes no parameters, and returns a String (the logical outcome) which is passed to the NavigationHandler for this application.
77      *
78      * @wapfaces.attribute
79      * inherit="true"
80      * abstract="true"
81      */

82     java.lang.String JavaDoc action;
83     
84     /**
85      * MethodBinding representing an action listener method that will be notified when this component is activated by the user. The expression must evaluate to a public method that takes an ActionEvent parameter, with a return type of void.
86      *
87      * @wapfaces.attribute
88      * inherit="true"
89      * abstract="true"
90      */

91     java.lang.String JavaDoc actionListener;
92     
93     /**
94      * The component identifier for the associated component.
95      *
96      * @wapfaces.attribute
97      * abstract="true"
98      * inherit="true"
99      */

100     java.lang.String JavaDoc id;
101     
102     /**
103      * Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
104      *
105      * @wapfaces.attribute
106      * abstract="true"
107      * inherit="true"
108      */

109     boolean rendered;
110         
111     /**
112      * The value binding expression linking this component to a property in a backing bean.
113      *
114      * @wapfaces.attribute
115      * abstract="true"
116      * inherit="true"
117      */

118     java.lang.String JavaDoc binding;
119  
120     /**
121      * Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.
122      *
123      * @wapfaces.attribute
124      * inherit="true"
125      * abstract="true"
126      */

127     boolean immediate;
128     
129     /**
130      * The current value of this component.
131      * TODO: implement this attribute.
132      *
133      * @wapfaces.attribute
134      * inherit="true"
135      * abstract="true"
136      */

137     java.lang.Object JavaDoc value;
138
139 }
140
Popular Tags