org.alfresco.web.ui.repo.component.property
Class UIPropertySheet

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIPanel
              extended by org.alfresco.web.ui.repo.component.property.UIPropertySheet
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class UIPropertySheet
extends javax.faces.component.UIPanel
implements javax.faces.component.NamingContainer

Component that represents the properties of a Node


Nested Class Summary
static class UIPropertySheet.ClientValidation
          Inner class representing a validation case that must be enforced.
 
Field Summary
static java.lang.String EDIT_MODE
           
protected  java.util.List validations
           
static java.lang.String VIEW_MODE
           
 
Fields inherited from class javax.faces.component.UIPanel
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
UIPropertySheet()
          Default constructor
 
Method Summary
 void addClientValidation(UIPropertySheet.ClientValidation validation)
          Adds a validation case to the property sheet
 void encodeBegin(javax.faces.context.FacesContext context)
           
 void encodeEnd(javax.faces.context.FacesContext context)
           
 java.util.List getClientValidations()
           
 java.lang.String getConfigArea()
           
 java.lang.String getFamily()
           
 java.lang.String getFinishButtonId()
          Returns the id of the finish button
 java.lang.String getMode()
           
 java.lang.String getNextButtonId()
          Returns the id of the next button
 Node getNode()
           
 java.lang.String getVar()
           
 boolean inEditMode()
          Determines whether the property sheet is in edit mode
 boolean isReadOnly()
           
 boolean isValidationEnabled()
           
protected  void renderValidationMethod(javax.faces.context.ResponseWriter out, UIPropertySheet.ClientValidation validation, boolean lastMethod, boolean showMessage)
           
protected  void renderValidationScript(javax.faces.context.FacesContext context)
          Renders the necessary JavaScript to enforce any constraints the properties have.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setConfigArea(java.lang.String configArea)
           
 void setFinishButtonId(java.lang.String finishButtonId)
          Sets the id of the finish button being used on the page
 void setMode(java.lang.String mode)
           
 void setNextButtonId(java.lang.String nextButtonId)
          Sets the id of the next button being used on the page
 void setNode(Node node)
           
 void setReadOnly(boolean readOnly)
           
 void setValidationEnabled(boolean validationEnabled)
           
 void setVar(java.lang.String variable)
           
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, 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
 

Field Detail

VIEW_MODE

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

EDIT_MODE

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

validations

protected java.util.List validations
Constructor Detail

UIPropertySheet

public UIPropertySheet()
Default constructor

Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIPanel
See Also:
UIComponent.getFamily()

encodeBegin

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

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context)
               throws java.io.IOException
Overrides:
encodeEnd in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException
See Also:
UIComponent.encodeBegin(javax.faces.context.FacesContext)

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 javax.faces.component.UIComponentBase
See Also:
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)

saveState

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

getNode

public Node getNode()
Returns:
Returns the node

setNode

public void setNode(Node node)
Parameters:
node - The node

getVar

public java.lang.String getVar()
Returns:
Returns the variable.

setVar

public void setVar(java.lang.String variable)
Parameters:
variable - The variable to set.

isReadOnly

public boolean isReadOnly()
Returns:
Returns whether the property sheet is read only

setReadOnly

public void setReadOnly(boolean readOnly)
Parameters:
readOnly - Sets the read only flag for the property sheet

isValidationEnabled

public boolean isValidationEnabled()
Returns:
true if validation is enabled for this property sheet

setValidationEnabled

public void setValidationEnabled(boolean validationEnabled)
Parameters:
validationEnabled - Sets the validationEnabled flag

getFinishButtonId

public java.lang.String getFinishButtonId()
Returns the id of the finish button

Returns:
The id of the finish button on the page

setFinishButtonId

public void setFinishButtonId(java.lang.String finishButtonId)
Sets the id of the finish button being used on the page

Parameters:
finishButtonId - The id of the finish button

getNextButtonId

public java.lang.String getNextButtonId()
Returns the id of the next button

Returns:
The id of the next button on the page

setNextButtonId

public void setNextButtonId(java.lang.String nextButtonId)
Sets the id of the next button being used on the page

Parameters:
nextButtonId - The id of the next button

getMode

public java.lang.String getMode()
Returns:
Returns the mode

setMode

public void setMode(java.lang.String mode)
Parameters:
mode - Sets the mode

inEditMode

public boolean inEditMode()
Determines whether the property sheet is in edit mode

Returns:
true if in edit mode

getConfigArea

public java.lang.String getConfigArea()
Returns:
Returns the config area to use

setConfigArea

public void setConfigArea(java.lang.String configArea)
Parameters:
configArea - Sets the config area to use

addClientValidation

public void addClientValidation(UIPropertySheet.ClientValidation validation)
Adds a validation case to the property sheet

Parameters:
validation - The validation case to enforce

getClientValidations

public java.util.List getClientValidations()
Returns:
Returns the list of client validations to enforce

renderValidationScript

protected void renderValidationScript(javax.faces.context.FacesContext context)
                               throws java.io.IOException
Renders the necessary JavaScript to enforce any constraints the properties have.

Parameters:
context - FacesContext
Throws:
java.io.IOException

renderValidationMethod

protected void renderValidationMethod(javax.faces.context.ResponseWriter out,
                                      UIPropertySheet.ClientValidation validation,
                                      boolean lastMethod,
                                      boolean showMessage)
                               throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.