001: // WARNING: This file was automatically generated. Do not edit it directly,
002: // or you will lose your changes.
003:
004: /*
005: * Licensed to the Apache Software Foundation (ASF) under one
006: * or more contributor license agreements. See the NOTICE file
007: * distributed with this work for additional information
008: * regarding copyright ownership. The ASF licenses this file
009: * to you under the Apache License, Version 2.0 (the
010: * "License"); you may not use this file except in compliance
011: * with the License. You may obtain a copy of the License at
012: *
013: * http://www.apache.org/licenses/LICENSE-2.0
014: *
015: * Unless required by applicable law or agreed to in writing,
016: * software distributed under the License is distributed on an
017: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
018: * KIND, either express or implied. See the License for the
019: * specific language governing permissions and limitations
020: * under the License.
021: */
022: package javax.faces.component.html;
023:
024: import javax.el.ValueExpression;
025: import javax.faces.component.UIOutput;
026: import javax.faces.context.FacesContext;
027:
028: /**
029: */
030: public class HtmlOutputFormat extends UIOutput {
031:
032: static public final String COMPONENT_FAMILY = "javax.faces.Output";
033: static public final String COMPONENT_TYPE = "javax.faces.HtmlOutputFormat";
034:
035: /**
036: * Construct an instance of the HtmlOutputFormat.
037: */
038: public HtmlOutputFormat() {
039: setRendererType("javax.faces.Format");
040: }
041:
042: // Property: style
043: private String _style;
044:
045: /**
046: * Gets CSS styling instructions.
047: *
048: * @return the new style value
049: */
050: public String getStyle() {
051: if (_style != null) {
052: return _style;
053: }
054: ValueExpression expression = getValueExpression("style");
055: if (expression != null) {
056: return (String) expression.getValue(getFacesContext()
057: .getELContext());
058: }
059: return null;
060: }
061:
062: /**
063: * Sets CSS styling instructions.
064: *
065: * @param style the new style value
066: */
067: public void setStyle(String style) {
068: this ._style = style;
069: }
070:
071: // Property: styleClass
072: private String _styleClass;
073:
074: /**
075: * Gets The CSS class for this element. Corresponds to the HTML 'class' attribute.
076: *
077: * @return the new styleClass value
078: */
079: public String getStyleClass() {
080: if (_styleClass != null) {
081: return _styleClass;
082: }
083: ValueExpression expression = getValueExpression("styleClass");
084: if (expression != null) {
085: return (String) expression.getValue(getFacesContext()
086: .getELContext());
087: }
088: return null;
089: }
090:
091: /**
092: * Sets The CSS class for this element. Corresponds to the HTML 'class' attribute.
093: *
094: * @param styleClass the new styleClass value
095: */
096: public void setStyleClass(String styleClass) {
097: this ._styleClass = styleClass;
098: }
099:
100: // Property: dir
101: private String _dir;
102:
103: /**
104: * Gets The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).
105: *
106: * @return the new dir value
107: */
108: public String getDir() {
109: if (_dir != null) {
110: return _dir;
111: }
112: ValueExpression expression = getValueExpression("dir");
113: if (expression != null) {
114: return (String) expression.getValue(getFacesContext()
115: .getELContext());
116: }
117: return null;
118: }
119:
120: /**
121: * Sets The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).
122: *
123: * @param dir the new dir value
124: */
125: public void setDir(String dir) {
126: this ._dir = dir;
127: }
128:
129: // Property: lang
130: private String _lang;
131:
132: /**
133: * Gets The base language of this document.
134: *
135: * @return the new lang value
136: */
137: public String getLang() {
138: if (_lang != null) {
139: return _lang;
140: }
141: ValueExpression expression = getValueExpression("lang");
142: if (expression != null) {
143: return (String) expression.getValue(getFacesContext()
144: .getELContext());
145: }
146: return null;
147: }
148:
149: /**
150: * Sets The base language of this document.
151: *
152: * @param lang the new lang value
153: */
154: public void setLang(String lang) {
155: this ._lang = lang;
156: }
157:
158: // Property: title
159: private String _title;
160:
161: /**
162: * Gets An advisory title for this element. Often used by the user agent as a tooltip.
163: *
164: * @return the new title value
165: */
166: public String getTitle() {
167: if (_title != null) {
168: return _title;
169: }
170: ValueExpression expression = getValueExpression("title");
171: if (expression != null) {
172: return (String) expression.getValue(getFacesContext()
173: .getELContext());
174: }
175: return null;
176: }
177:
178: /**
179: * Sets An advisory title for this element. Often used by the user agent as a tooltip.
180: *
181: * @param title the new title value
182: */
183: public void setTitle(String title) {
184: this ._title = title;
185: }
186:
187: // Property: escape
188: private boolean _escape = true;
189: private boolean _escapeSet;
190:
191: /**
192: * Gets Indicates whether rendered markup should be escaped. Default: true
193: *
194: * @return the new escape value
195: */
196: public boolean isEscape() {
197: if (_escapeSet) {
198: return _escape;
199: }
200: ValueExpression expression = getValueExpression("escape");
201: if (expression != null) {
202: return (Boolean) expression.getValue(getFacesContext()
203: .getELContext());
204: }
205: return true;
206: }
207:
208: /**
209: * Sets Indicates whether rendered markup should be escaped. Default: true
210: *
211: * @param escape the new escape value
212: */
213: public void setEscape(boolean escape) {
214: this ._escape = escape;
215: this ._escapeSet = true;
216: }
217:
218: @Override
219: public Object saveState(FacesContext facesContext) {
220: Object[] values = new Object[8];
221: values[0] = super .saveState(facesContext);
222: values[1] = _style;
223: values[2] = _styleClass;
224: values[3] = _dir;
225: values[4] = _lang;
226: values[5] = _title;
227: values[6] = _escape;
228: values[7] = _escapeSet;
229:
230: return values;
231: }
232:
233: @Override
234: public void restoreState(FacesContext facesContext, Object state) {
235: Object[] values = (Object[]) state;
236: super .restoreState(facesContext, values[0]);
237: _style = (String) values[1];
238: _styleClass = (String) values[2];
239: _dir = (String) values[3];
240: _lang = (String) values[4];
241: _title = (String) values[5];
242: _escape = (Boolean) values[6];
243: _escapeSet = (Boolean) values[7];
244: }
245:
246: @Override
247: public String getFamily() {
248: return COMPONENT_FAMILY;
249: }
250: }
|