com.sun.webui.jsf.component
Class PropertySheet

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by com.sun.webui.jsf.component.PropertySheet
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class PropertySheet
extends javax.faces.component.UIComponentBase
implements javax.faces.component.NamingContainer

The PropertySheet component is a NamingContainer used to layout PropertySheetSection components on a page. Each PropertySheetSection may in turn have any number of Property components within it. This allows you to easily format a page with a number of input or read-only fields. PropertySheetSections allow you to group Property components together and provide a label for the set of enclosed Propertys.

The PropertySheet allows eachPropertySheetSection to have an optional "jump link" from the top of the PropertySheet to each PropertySheetSection within the PropertySheet. This is accomplished by supplying the attribute jumpLinks with a value of true. If not specified, this attribute defaults to false.

For an example, please see the documentation for the propertySheet Tag.


Field Summary
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
PropertySheet()
          Constructor.
 
Method Summary
 void encodeBegin(javax.faces.context.FacesContext context)
          If the rendered property is true, render the begining of the current state of this UIComponent to the response contained in the specified FacesContext.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getRequiredFields()
          Specifies whether to display a required field legend in the upper right area of the property sheet.
 int getSectionCount()
           This method calculates the number of visible PropertySheetSections.
 java.lang.String getStyle()
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 java.util.List getVisibleSections()
           This method creates a List of visible (rendered=true) PropertySheetSection components.
 boolean isJumpLinks()
          This boolean attribute allows you to control whether jump links will be created at the top of this PropertySheet or not.
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setId(java.lang.String id)
          The component identifier for this component.
 void setJumpLinks(boolean jumpLinks)
          This boolean attribute allows you to control whether jump links will be created at the top of this PropertySheet or not.
 void setRendered(boolean rendered)
          Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page.
 void setRequiredFields(java.lang.String requiredFields)
          Specifies whether to display a required field legend in the upper right area of the property sheet.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySheet

public PropertySheet()
Constructor.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Specified by:
getFamily in class javax.faces.component.UIComponent

getSectionCount

public int getSectionCount()

This method calculates the number of visible PropertySheetSections. A PropertySheetSection can be made not visible by setting its rendered propety to false. It is also considered not visible if it contains no children (sub-sections or properties).

Returns:
The number of visible sections.

getVisibleSections

public java.util.List getVisibleSections()

This method creates a List of visible (rendered=true) PropertySheetSection components. PropertySheetSections must also contain some content to be considered visible.

Returns:
A List of visible PropertySheetSection objects.

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
If the rendered property is true, render the begining of the current state of this UIComponent to the response contained in the specified FacesContext. If a Renderer is associated with this UIComponent, the actual encoding will be delegated to Renderer.encodeBegin(FacesContext, UIComponent).

Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for the current request.
Throws:
java.io.IOException - if an input/output error occurs while rendering.
java.lang.NullPointerException - if FacesContext is null.

setId

public void setId(java.lang.String id)
The component identifier for this component. This value must be unique within the closest parent component that is a naming container.

Overrides:
setId in class javax.faces.component.UIComponentBase

setRendered

public void setRendered(boolean rendered)
Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.

Overrides:
setRendered in class javax.faces.component.UIComponentBase

isJumpLinks

public boolean isJumpLinks()

This boolean attribute allows you to control whether jump links will be created at the top of this PropertySheet or not. The default is NOT to create the links -- setting this attribute to "true" turns this feature on.


setJumpLinks

public void setJumpLinks(boolean jumpLinks)

This boolean attribute allows you to control whether jump links will be created at the top of this PropertySheet or not. The default is NOT to create the links -- setting this attribute to "true" turns this feature on.

See Also:
isJumpLinks()

getRequiredFields

public java.lang.String getRequiredFields()

Specifies whether to display a required field legend in the upper right area of the property sheet. This attribute should be set to true if one or more properties in the property sheet sections are marked required.


setRequiredFields

public void setRequiredFields(java.lang.String requiredFields)

Specifies whether to display a required field legend in the upper right area of the property sheet. This attribute should be set to true if one or more properties in the property sheet sections are marked required.

See Also:
getRequiredFields()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied to the outermost HTML element when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

See Also:
isVisible()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

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

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.

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


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.