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.UIColumn;
026: import javax.faces.context.FacesContext;
027:
028: /**
029: */
030: public class HtmlColumn extends UIColumn {
031:
032: static public final String COMPONENT_FAMILY = "javax.faces.Column";
033: static public final String COMPONENT_TYPE = "javax.faces.HtmlColumn";
034:
035: /**
036: * Construct an instance of the HtmlColumn.
037: */
038: public HtmlColumn() {
039: setRendererType(null);
040: }
041:
042: // Property: headerClass
043: private String _headerClass;
044:
045: /**
046: * Gets CSS class to be used for the header.
047: *
048: * @return the new headerClass value
049: */
050: public String getHeaderClass() {
051: if (_headerClass != null) {
052: return _headerClass;
053: }
054: ValueExpression expression = getValueExpression("headerClass");
055: if (expression != null) {
056: return (String) expression.getValue(getFacesContext()
057: .getELContext());
058: }
059: return null;
060: }
061:
062: /**
063: * Sets CSS class to be used for the header.
064: *
065: * @param headerClass the new headerClass value
066: */
067: public void setHeaderClass(String headerClass) {
068: this ._headerClass = headerClass;
069: }
070:
071: // Property: footerClass
072: private String _footerClass;
073:
074: /**
075: * Gets CSS class to be used for the footer.
076: *
077: * @return the new footerClass value
078: */
079: public String getFooterClass() {
080: if (_footerClass != null) {
081: return _footerClass;
082: }
083: ValueExpression expression = getValueExpression("footerClass");
084: if (expression != null) {
085: return (String) expression.getValue(getFacesContext()
086: .getELContext());
087: }
088: return null;
089: }
090:
091: /**
092: * Sets CSS class to be used for the footer.
093: *
094: * @param footerClass the new footerClass value
095: */
096: public void setFooterClass(String footerClass) {
097: this ._footerClass = footerClass;
098: }
099:
100: @Override
101: public Object saveState(FacesContext facesContext) {
102: Object[] values = new Object[3];
103: values[0] = super .saveState(facesContext);
104: values[1] = _headerClass;
105: values[2] = _footerClass;
106:
107: return values;
108: }
109:
110: @Override
111: public void restoreState(FacesContext facesContext, Object state) {
112: Object[] values = (Object[]) state;
113: super .restoreState(facesContext, values[0]);
114: _headerClass = (String) values[1];
115: _footerClass = (String) values[2];
116: }
117:
118: @Override
119: public String getFamily() {
120: return COMPONENT_FAMILY;
121: }
122: }
|