com.ibm.xsp.component
Class UIViewPanel

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIData
              extended by com.ibm.xsp.component.UIDataEx
                  extended by com.ibm.xsp.component.UIViewPanel
All Implemented Interfaces:
FacesAjaxComponent, FacesAttrsObject, FacesComponent, FacesDataIterator, FacesNestedDataTable, FacesRefreshableComponent, FacesRowAttrsComponent, FacesRowIndex, ThemeControl, javax.faces.component.NamingContainer, javax.faces.component.StateHolder
Direct Known Subclasses:
XspViewPanel

public class UIViewPanel
extends UIDataEx
implements FacesComponent, FacesNestedDataTable, FacesAttrsObject, FacesRowAttrsComponent

Abstract View Panel Component used to render table data in a feature rich convenient form. The View Panel has built in support for many features such as incorporating the pagers (if used) into the header or footer section of the view, support for a view panel title is also provided.

By default, the rendererType property must be set to "com.ibm.xsp.ViewPanel" This value can be changed by calling the setRendererType() method.

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 COMPONENT_TYPE
          The standard component type for this component.
static java.lang.String DEFAULT_VAR_NAME
           
static java.lang.String FOOTER_PAGER
           
static java.lang.String HEADER_PAGER
           
static java.lang.String INTERNAL_DATA_TABLE
           
static java.lang.String RENDERER_TYPE
           
static java.lang.String VIEW_TITLE
           
 
Fields inherited from class com.ibm.xsp.component.UIDataEx
AJAX_GETROWS, DEFAULT_ROWS_PER_PAGE
 
Fields inherited from class javax.faces.component.UIData
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponentBase
EMPTY_ITERATOR
 
Fields inherited from class javax.faces.component.UIComponent
_xspStateId
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
UIViewPanel()
           
 
Method Summary
 void addAttr(Attr attr)
          Add an Attr, to appear as an attribute in the HTML output of this control or object tag.
 void addRowAttr(Attr rowAttr)
          Add an Attr, to appear as an attribute on the table row element.
 void buildContents(javax.faces.context.FacesContext context, FacesComponentBuilder builder)
          Build the component children and facets, the default implementation is usually:
builder.buildAll(context, this, true); // includeFacets=true
 void encodeBegin(javax.faces.context.FacesContext context)
           
 java.util.List<Attr> getAttrs()
          The extra attributes to be output on the base element at the root of this control or object tag.
 java.lang.String getDataTableStyle()
           Return the value of the dataTableStyle property.
 java.lang.String getDataTableStyleClass()
           Return the value of the dataTableStyleClass property.
 java.lang.String getHeight()
          Returns null so the internal data table does not take the over all view panel width for its own.
 java.lang.String getOuterTableClientId(javax.faces.context.FacesContext context)
          Provided so that the dataTable rendered internally by the data Table Renderer has a different id from that of the overall view.
 java.lang.String getPageName()
          Returns the name of the page that should be opened when a link is clicked on this view.
 java.util.List<Attr> getRowAttrs()
          The extra attributes to be output on the table row element.
 java.lang.String[] getSelectedIds()
          Return the ids as an array
 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.
protected  TabularDataModel getTabularDataModel()
          Convenience method for retrieving the TabularDataModelEx object associated with this component.
 java.lang.String getTopPagerPosition()
           Return the value of the topPagerPosition property.
 java.lang.String getViewHeight()
          This value represents the over all height of the viewPanel, which is different from the height of the internal dataTable this viewPanel creates.
 java.lang.String getViewWidth()
          This value represents the over all width of the viewPanel, which is different from the width of the internal dataTable this viewPanel creates.
 java.lang.String getWidth()
          Sets the width for the over all view Column
 void initAfterContents(javax.faces.context.FacesContext context)
          Perform component initialization after it's children and facets are added.
 void initBeforeContents(javax.faces.context.FacesContext context)
          Perform component initialization before its children and facets are added.
 boolean invokeOnComponent(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAttrs(java.util.List<Attr> attrs)
          This method is not used by the XPage generated .java file - instead the addAttr(Attr) method is used to add attributes to the list.
 void setDataTableStyle(java.lang.String style)
           Set the value of the style property.
 void setDataTableStyleClass(java.lang.String styleClass)
           Set the value of the styleClass property.
 void setHeight(java.lang.String height)
          Sets the overall height of the view.
 void setPageName(java.lang.String name)
          Sets the name of the page to be opened when the link on a row is clicked.
 void setRowAttrs(java.util.List<Attr> rowAttrs)
          This method is not used by the XPage generated .java file - instead the addAttr(Attr) method is used to add attributes to the list.
 void setWidth(java.lang.String width)
          Sets the overall width of the view.
 
Methods inherited from class com.ibm.xsp.component.UIDataEx
_xspCleanTransientData, broadcast, computeDataModelKey, createDataModel, encodeEnd, getAjaxUrl, getAjaxUrl, getData, getDataModel, getDataSource, getIndexVar, getLastCreatedDataModel, getNonChildClientId, getRefreshId, getRowCount, getRowCount, getRows, getValue, getZeroRows, gotoFirstPage, gotoLastPage, gotoNextPage, gotoPage, gotoPreviousPage, gotoRow, handles, isNestedInDataIterator, isPartialExecute, isPartialRefresh, processAjaxGetRows, processAjaxRequest, processDecodes, processUpdates, processValidators, publishControlData, queueEvent, resetDataModel, resolveValue, revokeControlData, setData, setDataModel, setIndexVar, setRowIndex, setRows, setValue, setValueBinding, setVar, visitTree
 
Methods inherited from class javax.faces.component.UIData
getClientId, getFamily, getFirst, getFooter, getHeader, getRowData, getRowIndex, getVar, isRowAvailable, setFirst, setFooter, setHeader
 
Methods inherited from class javax.faces.component.UIComponentBase
_xspGetReadOnlyObj, _xspGetRendererData, _xspRemoveReadOnlyObj, _xspRemoveRendererData, _xspSetIdUnchecked, _xspSetReadOnlyObj, _xspSetRendererData, addFacesListener, decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class javax.faces.component.UIComponent
_xspGetStateId, _xspGetStateMap, _xspRestoreAttribute, _xspRestoreState, _xspSaveState, isVisitable, markInitialState, setControlState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.xsp.component.FacesDataIterator
getFirst, getRowIndex, setFirst
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE

The standard component type for this component.

See Also:
Constant Field Values

RENDERER_TYPE

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

INTERNAL_DATA_TABLE

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

DEFAULT_VAR_NAME

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

HEADER_PAGER

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

FOOTER_PAGER

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

VIEW_TITLE

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

UIViewPanel

public UIViewPanel()
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 UIDataEx
Returns:
a non-null themeId corresponding to the configuration for this type of control in a theme file.

initBeforeContents

public void initBeforeContents(javax.faces.context.FacesContext context)
                        throws javax.faces.FacesException
Description copied from interface: FacesComponent
Perform component initialization before its children and facets are added.

Specified by:
initBeforeContents in interface FacesComponent
Throws:
javax.faces.FacesException

initAfterContents

public void initAfterContents(javax.faces.context.FacesContext context)
                       throws javax.faces.FacesException
Description copied from interface: FacesComponent
Perform component initialization after it's children and facets are added.

Specified by:
initAfterContents in interface FacesComponent
Throws:
javax.faces.FacesException

buildContents

public void buildContents(javax.faces.context.FacesContext context,
                          FacesComponentBuilder builder)
                   throws javax.faces.FacesException
Description copied from interface: FacesComponent
Build the component children and facets, the default implementation is usually:
builder.buildAll(context, this, true); // includeFacets=true

Specified by:
buildContents in interface FacesComponent
Throws:
javax.faces.FacesException

getOuterTableClientId

public java.lang.String getOuterTableClientId(javax.faces.context.FacesContext context)
Provided so that the dataTable rendered internally by the data Table Renderer has a different id from that of the overall view. This is used by the ajax partial refresh that just wants the inner table refreshed.

Specified by:
getOuterTableClientId in interface FacesNestedDataTable

invokeOnComponent

public boolean invokeOnComponent(javax.faces.context.FacesContext context,
                                 java.lang.String clientId,
                                 javax.faces.component.ContextCallback callback)
                          throws javax.faces.FacesException
Overrides:
invokeOnComponent in class UIDataEx
Throws:
javax.faces.FacesException

getSelectedIds

public java.lang.String[] getSelectedIds()
Return the ids as an array

Returns:

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class UIDataEx
Throws:
java.io.IOException

getTabularDataModel

protected TabularDataModel getTabularDataModel()
Convenience method for retrieving the TabularDataModelEx object associated with this component.

Returns:
the TabularDataModel

getPageName

public java.lang.String getPageName()
Returns the name of the page that should be opened when a link is clicked on this view.

Returns:
the pageName

setPageName

public void setPageName(java.lang.String name)
Sets the name of the page to be opened when the link on a row is clicked.

Parameters:
name - the pageName to set

getDataTableStyle

public java.lang.String getDataTableStyle()

Return the value of the dataTableStyle property. Contents:

CSS style(s) to be applied when this component is rendered.


getViewWidth

public java.lang.String getViewWidth()
This value represents the over all width of the viewPanel, which is different from the width of the internal dataTable this viewPanel creates. When the width value is set on a viewPanel, that value is stored as the viewWidth so as to make a distingtion between it and the data table width value that the internal dataTable will look for.


getWidth

public java.lang.String getWidth()
Sets the width for the over all view Column


setWidth

public void setWidth(java.lang.String width)
Sets the overall width of the view.

Parameters:
width -

getViewHeight

public java.lang.String getViewHeight()
This value represents the over all height of the viewPanel, which is different from the height of the internal dataTable this viewPanel creates. When the height value is set on a viewPanel, that value is stored as the viewHeight so as to make a distingtion between it and the data table height value that the internal dataTable will look for.


getHeight

public java.lang.String getHeight()
Returns null so the internal data table does not take the over all view panel width for its own. getViewWidth() should be used to obtain the width.


setHeight

public void setHeight(java.lang.String height)
Sets the overall height of the view.

Parameters:
height -

getDataTableStyleClass

public java.lang.String getDataTableStyleClass()

Return the value of the dataTableStyleClass property. Contents:

Space-separated list of CSS style class(es) to be applied to the contained DataTable when it is rendered.


getTopPagerPosition

public java.lang.String getTopPagerPosition()

Return the value of the topPagerPosition property. Contents:

Indicates if there is to be a pager present in the cell above the tableData, indicating the region in this cell where its to be positioned (top | left | right | bottom).


getAttrs

public java.util.List<Attr> getAttrs()
The extra attributes to be output on the base element at the root of this control or object tag. This should only be used when none of the properties in the All Properties pane correspond to the desired attribute. This may return null. The addAttr(Attr) method should be used to add an Attr.

Specified by:
getAttrs in interface FacesAttrsObject

addAttr

public void addAttr(Attr attr)
Add an Attr, to appear as an attribute in the HTML output of this control or object tag.

Specified by:
addAttr in interface FacesAttrsObject
Parameters:
action -

setAttrs

public void setAttrs(java.util.List<Attr> attrs)
This method is not used by the XPage generated .java file - instead the addAttr(Attr) method is used to add attributes to the list.


getRowAttrs

public java.util.List<Attr> getRowAttrs()
The extra attributes to be output on the table row element. This should only be used when none of the properties in the All Properties pane correspond to the desired attribute. This may return null. The addRowAttr(Attr) method should be used to add a row Attr.

Specified by:
getRowAttrs in interface FacesRowAttrsComponent

addRowAttr

public void addRowAttr(Attr rowAttr)
Add an Attr, to appear as an attribute on the table row element.

Specified by:
addRowAttr in interface FacesRowAttrsComponent
Parameters:
action -

setRowAttrs

public void setRowAttrs(java.util.List<Attr> rowAttrs)
This method is not used by the XPage generated .java file - instead the addAttr(Attr) method is used to add attributes to the list.


saveState

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

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 UIDataEx

setDataTableStyle

public void setDataTableStyle(java.lang.String style)

Set the value of the style property.


setDataTableStyleClass

public void setDataTableStyleClass(java.lang.String styleClass)

Set the value of the styleClass property.