org.zkoss.jsf.zul.impl
Class BranchOutput

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.zkoss.jsf.zul.impl.AbstractComponent
              extended by org.zkoss.jsf.zul.impl.LeafComponent
                  extended by org.zkoss.jsf.zul.impl.BranchComponent
                      extended by org.zkoss.jsf.zul.impl.BranchOutput
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.component.ValueHolder, ValueHolderSupport
Direct Known Subclasses:
BranchInput

public abstract class BranchOutput
extends BranchComponent
implements javax.faces.component.ValueHolder, ValueHolderSupport

The skeletal class used to implement the ZULJSF components which needs to support ValueHolder.
Components should be declared nested under Page. see Javadoc of JSF Specification

Author:
Dennis.Chen

Field Summary
 
Fields inherited from class org.zkoss.jsf.zul.impl.LeafComponent
_compAttrMap, _composer
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
BranchOutput()
           
 
Method Summary
protected  void afterZULComponentComposed(org.zkoss.zk.ui.Component zulcomp)
          Override Method, if instance implements ValueHolderSupport (always for now), then i will try to set the value from ValueHolder to ZUL Component.
 javax.faces.convert.Converter getConverter()
           
 java.lang.Object getLocalValue()
           
 java.lang.String getMappedAttributeName()
          Return ZUL Component attribute to map to value attribute of ValueHolder, delivering class might override this method to return corresponding name.
 java.lang.Object getValue()
           
 boolean isLocalValueSet()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          Override Method, restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Override Method, save the state of this component.
 void setConverter(javax.faces.convert.Converter converter)
           
 void setLocalValueSet(boolean localValueSet)
           
 void setValue(java.lang.Object value)
           
 java.lang.Object transferValueForAttribute(java.lang.String value)
          Default implementation return original String
 
Methods inherited from class org.zkoss.jsf.zul.impl.BranchComponent
loadZULTree
 
Methods inherited from class org.zkoss.jsf.zul.impl.LeafComponent
addZULDynamicAttribute, encodeBegin, encodeChildren, encodeEnd, evaluateDynaAttributes, getAttributeValue, getComponentDefName, getComponentInfo, getForward, getRendersChildren, getUse, getZULComponent, setAttributeValue, setForward, setId, setUse, setZULDynamicAttribute
 
Methods inherited from class org.zkoss.jsf.zul.impl.AbstractComponent
findAncestorWithClass, getBodyContent, getFacesContext, getFamily, getIf, getUnless, isEffective, isSuppressed, restoreAttachedMapState, saveAttachedMapState, setBodyContent, setIf, setSuppressed, setUnless
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BranchOutput

public BranchOutput()
Method Detail

isLocalValueSet

public boolean isLocalValueSet()

setLocalValueSet

public void setLocalValueSet(boolean localValueSet)

getLocalValue

public java.lang.Object getLocalValue()
Specified by:
getLocalValue in interface javax.faces.component.ValueHolder

getConverter

public javax.faces.convert.Converter getConverter()
Specified by:
getConverter in interface javax.faces.component.ValueHolder

setConverter

public void setConverter(javax.faces.convert.Converter converter)
Specified by:
setConverter in interface javax.faces.component.ValueHolder

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface javax.faces.component.ValueHolder

setValue

public void setValue(java.lang.Object value)
Specified by:
setValue in interface javax.faces.component.ValueHolder

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Override Method, save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class LeafComponent

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Override Method, restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class LeafComponent

afterZULComponentComposed

protected void afterZULComponentComposed(org.zkoss.zk.ui.Component zulcomp)
Override Method, if instance implements ValueHolderSupport (always for now), then i will try to set the value from ValueHolder to ZUL Component.

Overrides:
afterZULComponentComposed in class LeafComponent

getMappedAttributeName

public java.lang.String getMappedAttributeName()
Return ZUL Component attribute to map to value attribute of ValueHolder, delivering class might override this method to return corresponding name. Note : Default is "value"

Specified by:
getMappedAttributeName in interface ValueHolderSupport
Returns:
name of attribute of zul component.
See Also:
ValueHolderSupport

transferValueForAttribute

public java.lang.Object transferValueForAttribute(java.lang.String value)
Default implementation return original String

Specified by:
transferValueForAttribute in interface ValueHolderSupport
Parameters:
value - a String value to transfer to a component suitable Object.
Returns:
the suitable Object to set to attribute of zul component.
See Also:
ValueHolderSupport


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.