org.apache.shale.component
Class Token

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.shale.component.Token
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class Token
extends javax.faces.component.UIInput

Component that renders a transaction token input field, and then validates it on a subsequent form submit. The token component must be the last input component child of the parent form to be processed.

$Id: Token.java 472288 2006-11-07 21:41:16Z rahul $


Field Summary
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
Constructor Summary
Token()
          Create a default instance of this component.
 
Method Summary
 String getFamily()
          Return the component family for this component.
 String getMessageDetail()
          Returns the validation messageDetail used to create a FacesMessage.SEVERITY_ERROR.
 String getMessageSummary()
          Returns the validation messageSummary used to create a FacesMessage.SEVERITY_ERROR.
 String getToken()
          Return the transaction token value to be rendered for this occcurrence of this component.
 void restoreState(javax.faces.context.FacesContext context, Object obj)
          Restores the components state.
 Object saveState(javax.faces.context.FacesContext context)
          Saves the components state.
 void setMessageDetail(String message)
          Sets a messageDetail override used when reporting a token verification failure.
 void setMessageSummary(String message)
          Sets a messageSummary override used when reporting a token verification failure.
 void validate(javax.faces.context.FacesContext context)
          Perform superclass validations, then ensure that the specified input value is acceptable at this point in time.
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter
 

Constructor Detail

Token

public Token()

Create a default instance of this component.

Method Detail

getMessageSummary

public String getMessageSummary()

Returns the validation messageSummary used to create a FacesMessage.SEVERITY_ERROR.


setMessageSummary

public void setMessageSummary(String message)

Sets a messageSummary override used when reporting a token verification failure.

Parameters:
message - The new message summary

getMessageDetail

public String getMessageDetail()

Returns the validation messageDetail used to create a FacesMessage.SEVERITY_ERROR.


setMessageDetail

public void setMessageDetail(String message)

Sets a messageDetail override used when reporting a token verification failure.

Parameters:
message - The new message detail

getFamily

public String getFamily()

Return the component family for this component.

Overrides:
getFamily in class javax.faces.component.UIInput

validate

public void validate(javax.faces.context.FacesContext context)

Perform superclass validations, then ensure that the specified input value is acceptable at this point in time.

Overrides:
validate in class javax.faces.component.UIInput
Parameters:
context - FacesContext for the current request

getToken

public String getToken()

Return the transaction token value to be rendered for this occcurrence of this component. As a side effect, the transaction token value will be saved for verification on a subsequent submit.


restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object obj)

Restores the components state.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIInput
Parameters:
context - FacesContext for the current request
obj - State to be restored

saveState

public Object saveState(javax.faces.context.FacesContext context)

Saves the components state.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIInput
Parameters:
context - FacesContext for the current request


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.