com.ibm.xsp.component
Class UIInputCheckbox

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 com.ibm.xsp.component.UIInputEx
                      extended by com.ibm.xsp.component.UIInputCheckbox
All Implemented Interfaces:
FacesComponent, FacesInputComponent, FacesInputFiltering, FacesOutputFiltering, FacesDojoComponent, ThemeControl, javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder
Direct Known Subclasses:
XspInputCheckbox

public class UIInputCheckbox
extends UIInputEx

Not intended to be subclassed.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.component.UIComponentBase
javax.faces.component.UIComponentBase.AggregatedIterator, javax.faces.component.UIComponentBase.UnmodifiableIterator
 
Nested classes/interfaces inherited from class javax.faces.component.UIComponent
javax.faces.component.UIComponent.StateMap, javax.faces.component.UIComponent.StateMapEntry
 
Field Summary
static java.lang.String CHECKED_VALUE_DEFAULT
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String UNCHECKED_VALUE_DEFAULT
           
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIComponentBase
EMPTY_ITERATOR
 
Fields inherited from class javax.faces.component.UIComponent
_xspStateId
 
Constructor Summary
UIInputCheckbox()
           
 
Method Summary
 java.lang.String getCheckedValue()
           
 java.lang.String getCustomHtmlValue()
           
 java.lang.Object getDefaultValue()
           Return the default value of this control.
 java.lang.String getStyleKitFamily()
          The styleKitFamily is basically the default themeId, to use if the "themeId" property is not set on this control instance in the XPage source.
 java.lang.String getUncheckedValue()
           
 boolean isChecked()
           
static boolean isChecked(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
 boolean isDefaultChecked()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setCheckedValue(java.lang.String checkedValue)
           
 void setDefaultChecked(boolean defaultChecked)
           
 void setDefaultValue(java.lang.Object defaultValue)
           Set the default value for this control.
 void setUncheckedValue(java.lang.String uncheckedValue)
           
 boolean useCustomHtmlValue()
           
 void validate(javax.faces.context.FacesContext context)
          Normal validation and additionally check the value matches either the checked or unchecked value for this checkbox.
 
Methods inherited from class com.ibm.xsp.component.UIInputEx
addDojoAttribute, buildContents, getConvertedValue, getDefaultHtmlFilter, getDefaultHtmlFilterIn, getDojoAttributes, getDojoType, getHtmlFilter, getHtmlFilterIn, getHtmlFilterInName, getHtmlFilterName, getMultipleSeparator, getRendererComponent, getRequiredMessage, getValue, getValueAsList, getValueAsString, initAfterContents, initBeforeContents, isDisableClientSideValidation, isDisableModifiedFlag, isDisableValidators, isMultipleTrim, isRequired, setDisableClientSideValidation, setDisableModifiedFlag, setDisableValidators, setDojoAttributes, setDojoType, setMultipleSeparator, setMultipleTrim, setRendererComponent, setRequired, setValueFromString, updateModel, validateValue
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getFamily, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
_xspCleanTransientData, _xspGetReadOnlyObj, _xspGetRendererData, _xspRemoveReadOnlyObj, _xspRemoveRendererData, _xspSetIdUnchecked, _xspSetReadOnlyObj, _xspSetRendererData, addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
_xspGetStateId, _xspGetStateMap, _xspRestoreAttribute, _xspRestoreState, _xspSaveState, invokeOnComponent, isVisitable, markInitialState, setControlState, visitTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

CHECKED_VALUE_DEFAULT

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

UNCHECKED_VALUE_DEFAULT

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

COMPONENT_TYPE

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

UIInputCheckbox

public UIInputCheckbox()
Method Detail

getStyleKitFamily

public java.lang.String getStyleKitFamily()
Description copied from interface: ThemeControl
The styleKitFamily is basically the default themeId, to use if the "themeId" property is not set on this control instance in the XPage source. For example, "InputField.EditBox" is used for most Edit Box controls. See Domino/xsp/nsf/themes/webstandard.theme for more examples.

The implementation may return different values depending on the configuration of the current control, for example the Button control returns a different value and looks different when it is configured as a cancel button.

Specified by:
getStyleKitFamily in interface ThemeControl
Overrides:
getStyleKitFamily in class UIInputEx
Returns:
a non-null themeId corresponding to the configuration for this type of control in a theme file.
See Also:
ThemeControl.getStyleKitFamily()

useCustomHtmlValue

public boolean useCustomHtmlValue()

getCustomHtmlValue

public java.lang.String getCustomHtmlValue()

getCheckedValue

public java.lang.String getCheckedValue()
Returns:
the checkedValue

setCheckedValue

public void setCheckedValue(java.lang.String checkedValue)
Parameters:
checkedValue - the checkedValue to set

getUncheckedValue

public java.lang.String getUncheckedValue()
Returns:
the uncheckedValue

setUncheckedValue

public void setUncheckedValue(java.lang.String uncheckedValue)
Parameters:
uncheckedValue - the uncheckedValue to set

isDefaultChecked

public boolean isDefaultChecked()
Returns:
the default checked flag

setDefaultChecked

public void setDefaultChecked(boolean defaultChecked)
Parameters:
defaultChecked - Set the default checked flag

setDefaultValue

public void setDefaultValue(java.lang.Object defaultValue)
Description copied from class: UIInputEx

Set the default value for this control.

Overrides:
setDefaultValue in class UIInputEx

getDefaultValue

public java.lang.Object getDefaultValue()
Description copied from class: UIInputEx

Return the default value of this control. This is an object, not a String, the converter is not applied to the value, so if you need to set an int or Date as the default value, you will need to compute the value as the correct type, rather than typing it directly into the property in the XPage as a String. The object should be serializable or computed, to prevent errors when persistence is enabled.

Overrides:
getDefaultValue in class UIInputEx

validate

public void validate(javax.faces.context.FacesContext context)
Normal validation and additionally check the value matches either the checked or unchecked value for this checkbox. (non-Javadoc)

Overrides:
validate in class javax.faces.component.UIInput
See Also:
UIInput.validate(javax.faces.context.FacesContext)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class UIInputEx

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class UIInputEx

isChecked

public boolean isChecked()

isChecked

public static boolean isChecked(javax.faces.context.FacesContext context,
                                javax.faces.component.UIComponent component)