1 // WARNING: This file was automatically generated. Do not edit it directly,
2 // or you will lose your changes.
3
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 */
22 package org.apache.myfaces.trinidad.component;
23
24 import javax.faces.component.ValueHolder;
25 import javax.faces.convert.Converter;
26 import org.apache.myfaces.trinidad.bean.FacesBean;
27 import org.apache.myfaces.trinidad.bean.PropertyKey;
28
29 /**
30 *
31 * <h4>Events:</h4>
32 * <table border="1" width="100%" cellpadding="3" summary="">
33 * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
34 * <th align="left">Type</th>
35 * <th align="left">Phases</th>
36 * <th align="left">Description</th>
37 * </tr>
38 * <tr class="TableRowColor">
39 * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
40 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
41 * <td valign="top">Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.</td>
42 * </tr>
43 * </table>
44 */
45 abstract public class UIXValue extends UIXComponentBase
46 implements ValueHolder
47 {
48 static public final FacesBean.Type TYPE = new FacesBean.Type(
49 UIXComponentBase.TYPE);
50 static public final PropertyKey VALUE_KEY =
51 TYPE.registerKey("value");
52 static public final PropertyKey CONVERTER_KEY =
53 TYPE.registerKey("converter", Converter.class, PropertyKey.CAP_STATE_HOLDER);
54
55 static public final String COMPONENT_FAMILY =
56 "org.apache.myfaces.trinidad.Value";
57 static public final String COMPONENT_TYPE =
58 "org.apache.myfaces.trinidad.Value";
59 /**
60 * Return the locally stored value, ignoring any ValueBinding
61 * set for "value".
62 */
63 public Object getLocalValue()
64 {
65 PropertyKey key = UIXValue.VALUE_KEY;
66 return getFacesBean().getLocalProperty(key);
67 }
68
69 /**
70 * Gets the value of the component. If the EL binding
71 * for the "value" points to a bean property with a getter but no setter, and
72 * this is an editable component, the component will be rendered
73 * in read-only mode.
74 *
75 * @return the new value value
76 */
77 final public Object getValue()
78 {
79 return getProperty(VALUE_KEY);
80 }
81
82 /**
83 * Sets the value of the component. If the EL binding
84 * for the "value" points to a bean property with a getter but no setter, and
85 * this is an editable component, the component will be rendered
86 * in read-only mode.
87 *
88 * @param value the new value value
89 */
90 final public void setValue(Object value)
91 {
92 setProperty(VALUE_KEY, (value));
93 }
94
95 /**
96 * Gets a converter object
97 *
98 * @return the new converter value
99 */
100 final public Converter getConverter()
101 {
102 return (Converter)getProperty(CONVERTER_KEY);
103 }
104
105 /**
106 * Sets a converter object
107 *
108 * @param converter the new converter value
109 */
110 final public void setConverter(Converter converter)
111 {
112 setProperty(CONVERTER_KEY, (converter));
113 }
114
115 @Override
116 public String getFamily()
117 {
118 return COMPONENT_FAMILY;
119 }
120
121 @Override
122 protected FacesBean.Type getBeanType()
123 {
124 return TYPE;
125 }
126
127 /**
128 * Construct an instance of the UIXValue.
129 */
130 protected UIXValue(
131 String rendererType
132 )
133 {
134 super(rendererType);
135 }
136
137 /**
138 * Construct an instance of the UIXValue.
139 */
140 protected UIXValue()
141 {
142 this(null);
143 }
144
145 static
146 {
147 TYPE.lockAndRegister("org.apache.myfaces.trinidad.Value","org.apache.myfaces.trinidad.Value");
148 }
149 }