org.apache.myfaces.custom.collapsiblepanel
Class AbstractHtmlCollapsiblePanel

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by org.apache.myfaces.custom.collapsiblepanel.AbstractHtmlCollapsiblePanel
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, EventAware, StyleAware, UniversalProperties, UserRoleAware
Direct Known Subclasses:
HtmlCollapsiblePanel

public abstract class AbstractHtmlCollapsiblePanel
extends javax.faces.component.UIInput
implements StyleAware, UniversalProperties, EventAware, UserRoleAware

A component which just renders as a single icon (with optional label) when "collapsed", hiding all child components. When open, the child components can be seen. The title attribute defines the label shown for the collapsible panel.

Since:
1.1.7
Version:
$Revision: 1082760 $ $Date: 2011-03-17 19:04:58 -0500 (Thu, 17 Mar 2011) $
Author:
Kalle Korhonen (latest modification by $Author: lu4242 $)

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Fields inherited from interface org.apache.myfaces.component.UserRoleAware
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR
 
Constructor Summary
AbstractHtmlCollapsiblePanel()
           
 
Method Summary
 void encodeChildren(javax.faces.context.FacesContext context)
           
 java.lang.String getClientId(javax.faces.context.FacesContext context)
           
 javax.faces.component.UIComponent getClosedContent()
           
 javax.faces.component.UIComponent getHeader()
           
abstract  java.lang.String getIndicatorStyle()
          HTML: CSS styling instructions for the generated indicator.
abstract  java.lang.String getIndicatorStyleClass()
          The CSS class for this element.
abstract  java.lang.String getTitleStyle()
          HTML: CSS styling instructions for the generated title.
abstract  java.lang.String getTitleStyleClass()
          The CSS class for this element.
abstract  java.lang.String getTitleVar()
          This variable is defined to hold the value of the title component - you can use it for accessing this value in custom headers you define in a facet with name 'header'.
 javax.faces.el.MethodBinding getValidator()
           
 javax.faces.el.MethodBinding getValueChangeListener()
           
abstract  java.lang.String getVar()
          The variable which you can use to check for the collapsed state of the enclosing component.
 boolean isCollapsed()
           
static boolean isCollapsed(java.lang.Object collapsedValue)
           
 boolean isCurrentlyCollapsed()
           
 boolean isImmediate()
           
 boolean isRequired()
           
 void processDecodes(javax.faces.context.FacesContext context)
           
 void processUpdates(javax.faces.context.FacesContext context)
           
 void processValidators(javax.faces.context.FacesContext context)
           
 void setClosedContent(javax.faces.component.UIComponent closedContent)
           
 void setCurrentlyCollapsed(boolean collapsed)
           
 void setHeader(javax.faces.component.UIComponent header)
           
 void updateModel(javax.faces.context.FacesContext context)
           
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getConverterMessage, getFamily, getRequiredMessage, getSubmittedValue, getValidatorMessage, getValidators, getValue, getValueChangeListeners, isLocalValueSet, isValid, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeBegin, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, 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
 
Methods inherited from interface org.apache.myfaces.component.StyleAware
getStyle, getStyleClass
 
Methods inherited from interface org.apache.myfaces.component.UniversalProperties
getDir, getLang, getTitle
 
Methods inherited from interface org.apache.myfaces.component.EventAware
getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup
 
Methods inherited from interface org.apache.myfaces.component.UserRoleAware
getEnabledOnUserRole, getVisibleOnUserRole, setEnabledOnUserRole, setVisibleOnUserRole
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

AbstractHtmlCollapsiblePanel

public AbstractHtmlCollapsiblePanel()
Method Detail

setCurrentlyCollapsed

public void setCurrentlyCollapsed(boolean collapsed)

isCurrentlyCollapsed

public boolean isCurrentlyCollapsed()

setHeader

public void setHeader(javax.faces.component.UIComponent header)

getHeader

public javax.faces.component.UIComponent getHeader()

setClosedContent

public void setClosedContent(javax.faces.component.UIComponent closedContent)

getClosedContent

public javax.faces.component.UIComponent getClosedContent()

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)
Overrides:
processDecodes in class javax.faces.component.UIInput

getClientId

public java.lang.String getClientId(javax.faces.context.FacesContext context)
Overrides:
getClientId in class javax.faces.component.UIComponentBase

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)
Overrides:
processUpdates in class javax.faces.component.UIInput

processValidators

public void processValidators(javax.faces.context.FacesContext context)
Overrides:
processValidators in class javax.faces.component.UIInput

encodeChildren

public void encodeChildren(javax.faces.context.FacesContext context)
                    throws java.io.IOException
Overrides:
encodeChildren in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

updateModel

public void updateModel(javax.faces.context.FacesContext context)
Overrides:
updateModel in class javax.faces.component.UIInput

isCollapsed

public boolean isCollapsed()

isCollapsed

public static boolean isCollapsed(java.lang.Object collapsedValue)

getVar

public abstract java.lang.String getVar()
The variable which you can use to check for the collapsed state of the enclosing component. This is especially useful for custom headers you define in a facet with name 'header'.


getTitleVar

public abstract java.lang.String getTitleVar()
This variable is defined to hold the value of the title component - you can use it for accessing this value in custom headers you define in a facet with name 'header'.


getValidator

public javax.faces.el.MethodBinding getValidator()
Specified by:
getValidator in interface javax.faces.component.EditableValueHolder
Overrides:
getValidator in class javax.faces.component.UIInput

getValueChangeListener

public javax.faces.el.MethodBinding getValueChangeListener()
Specified by:
getValueChangeListener in interface javax.faces.component.EditableValueHolder
Overrides:
getValueChangeListener in class javax.faces.component.UIInput

isImmediate

public boolean isImmediate()
Specified by:
isImmediate in interface javax.faces.component.EditableValueHolder
Overrides:
isImmediate in class javax.faces.component.UIInput

isRequired

public boolean isRequired()
Specified by:
isRequired in interface javax.faces.component.EditableValueHolder
Overrides:
isRequired in class javax.faces.component.UIInput

getIndicatorStyleClass

public abstract java.lang.String getIndicatorStyleClass()
The CSS class for this element. Corresponds to the HTML 'class' attribute for the generated indicator span. This attribute is ignored if a custom "header" facet is provided for the collapsible panel

Returns:

getIndicatorStyle

public abstract java.lang.String getIndicatorStyle()
HTML: CSS styling instructions for the generated indicator. This attribute is ignored if a custom "header" facet is provided for the collapsible panel

Returns:

getTitleStyleClass

public abstract java.lang.String getTitleStyleClass()
The CSS class for this element. Corresponds to the HTML 'class' attribute for the generated title. This attribute is ignored if a custom "header" facet is provided for the collapsible panel

Returns:

getTitleStyle

public abstract java.lang.String getTitleStyle()
HTML: CSS styling instructions for the generated title. This attribute is ignored if a custom "header" facet is provided for the collapsible panel

Returns:


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.