001: /*
002: * Version: MPL 1.1/GPL 2.0/LGPL 2.1
003: *
004: * "The contents of this file are subject to the Mozilla Public License
005: * Version 1.1 (the "License"); you may not use this file except in
006: * compliance with the License. You may obtain a copy of the License at
007: * http://www.mozilla.org/MPL/
008: *
009: * Software distributed under the License is distributed on an "AS IS"
010: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
011: * License for the specific language governing rights and limitations under
012: * the License.
013: *
014: * The Original Code is ICEfaces 1.5 open source software code, released
015: * November 5, 2006. The Initial Developer of the Original Code is ICEsoft
016: * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
017: * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved.
018: *
019: * Contributor(s): _____________________.
020: *
021: * Alternatively, the contents of this file may be used under the terms of
022: * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"
023: * License), in which case the provisions of the LGPL License are
024: * applicable instead of those above. If you wish to allow use of your
025: * version of this file only under the terms of the LGPL License and not to
026: * allow others to use your version of this file under the MPL, indicate
027: * your decision by deleting the provisions above and replace them with
028: * the notice and other provisions required by the LGPL License. If you do
029: * not delete the provisions above, a recipient may use your version of
030: * this file under either the MPL or the LGPL License."
031: *
032: */
033:
034: package com.icesoft.faces.component.ext;
035:
036: import javax.faces.context.FacesContext;
037: import javax.faces.el.ValueBinding;
038:
039: // We do not need this class, but Sun Studio Creator requires it.
040:
041: public class UIColumn extends javax.faces.component.UIColumn {
042: public static final String COMPONENT_TYPE = "com.icesoft.faces.Column";
043:
044: /**
045: * <p>Return the family for this component.</p>
046: */
047: public String getFamily() {
048: return "javax.faces.Column";
049: }
050:
051: // binding
052: private String binding = null;
053:
054: public String getBinding() {
055: return this .binding;
056: }
057:
058: public void setBinding(String binding) {
059: this .binding = binding;
060: }
061:
062: // id
063: private String id = null;
064:
065: public String getId() {
066: return this .id;
067: }
068:
069: public void setId(String id) {
070: this .id = id;
071: }
072:
073: // rendered
074: private String rendered = null;
075:
076: public String getRendered() {
077: if (this .rendered != null) {
078: return this .rendered;
079: }
080: ValueBinding _vb = getValueBinding("rendered");
081: if (_vb != null) {
082: return (String) _vb.getValue(getFacesContext());
083: }
084: return null;
085: }
086:
087: public void setRendered(String rendered) {
088: this .rendered = rendered;
089: }
090:
091: /**
092: * <p>Restore the state of this component.</p>
093: */
094: public void restoreState(FacesContext _context, Object _state) {
095: Object _values[] = (Object[]) _state;
096: super .restoreState(_context, _values[0]);
097: this .binding = (String) _values[1];
098: this .id = (String) _values[2];
099: this .rendered = (String) _values[3];
100: }
101:
102: /**
103: * <p>Save the state of this component.</p>
104: */
105: public Object saveState(FacesContext _context) {
106: Object _values[] = new Object[4];
107: _values[0] = super .saveState(_context);
108: _values[1] = this .binding;
109: _values[2] = this .id;
110: _values[3] = this.rendered;
111: return _values;
112: }
113:
114: }
|