|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.bpe.jsf.handler.BPCListHandler
public class BPCListHandler
This class can be used as a Faces Managed Bean that provides the data to be displayed
in a List Component. In order to associate a Managed Bean of type
BPCListHandler with a List Component on a page, the Value Binding Expression
of the list tag must be targeted at the Managed Bean. For more information
about the List Component, see ListTag
.
The BPCListHandler
class generates Item Changed events whenever an item in the
associated List Component is selected. The ItemListener can be registered
on the BPCListHandler
using the ItemListener
property. For more information
about using the ItemListener
interface, see the example shown in
ItemListener
.
Example:
<managed-bean> <managed-bean-name>ProcessInstanceList</managed-bean-name> <managed-bean-class>com.ibm.bpe.jsf.handler.BPCListHandler</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>type</property-name> <value>com.ibm.bpe.client.model.ProcessInstanceBean</value> </managed-property> <managed-property> <property-name>itemListener</property-name> <list-entries> <value-class>com.ibm.bpe.jsf.handler.ItemListener</value-class> <value>#{ProcessInstanceDetailsBean}</value> </list-entries> </managed-property> <managed-property> <property-name>query</property-name> <value>#{ProcessInstanceQuery}</value> </managed-property> </managed-bean>The specified type enables Components to retrieve metadata about the model objects that are accessed through the
BPCDetailsHandler
instance. BPCListComponent
instance as a model of a
ListComponent:
<bpe:list model="#{ProcessInstanceList}" rows="5" styleClass="list" headerStyleClass="listHeader" rowClasses="normal"> <bpe:column name="name" action="processInstanceDetails" /> <bpe:column name="processTemplateName" action="processTemplateDetails" /> <bpe:column name="executionState" /> <bpe:column name="startTime" /> </bpe:list>
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_FOR_SORTING
The name of the component attribute that determines which row is used when sorting the results. |
static java.lang.String |
COPYRIGHT
|
Constructor Summary | |
---|---|
BPCListHandler()
|
Method Summary | |
---|---|
void |
addItemListener(ItemListener listener)
Adds a new ItemListener object to the list of ItemListener objects. |
void |
clearSelection()
Resets the selection of the associated list to 'none'. |
java.lang.String |
executeQuery()
Triggers execution of the associated query. |
java.util.Map |
getErrors()
Returns the errors map for items in the list. |
java.lang.Object |
getItem()
Returns the currently selected item. |
java.util.List |
getItemListener()
Returns a list of all registered ItemListener objects. |
java.util.List |
getItems()
Returns a list of all the items retrieved by running the associated query. |
java.lang.String |
getName()
Returnes the list name. |
boolean |
getNotEmpty()
|
com.ibm.bpe.jsf.handler.BPCListHandlerPagingHelper |
getPagingHelper()
The returned class is not for public use. |
Query |
getQuery()
Returns the registered query object. |
Message |
getQueryMessage()
Returns message indication problems that occurred during execution of the query. |
java.util.List |
getSelectedItems()
Returns all selected items in the list. |
com.ibm.bpe.jsf.handler.BPCListHandlerSelectionHelper |
getSelectionHelper()
The returned class is not for public use. |
com.ibm.bpe.jsf.handler.BPCListHandlerSortHelper |
getSortHelper()
The returned class is not for public use. |
java.lang.String |
getType()
Returns the expected type of the query model. |
java.lang.String |
refreshList()
Triggers a refresh of the list by executing the associated query. |
java.lang.String |
refreshList(boolean clearErrors)
Triggers a refresh of the list by executing the associated query. |
void |
setErrors(java.util.Map errors)
Sets the errors map for this instance. |
void |
setItemListener(java.util.List list)
Sets the list of ItemListener objects. |
void |
setName(java.lang.String name)
Sets the list name. |
void |
setQuery(Query newQuery)
Sets the query used to retrieve the list of items. |
void |
setType(java.lang.String typeName)
Sets the type of the BPCListHandler . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String ATTRIBUTE_FOR_SORTING
sortBy(ActionEvent)
.
Constructor Detail |
---|
public BPCListHandler()
Method Detail |
---|
public void clearSelection()
public java.util.List getItems()
public java.lang.String refreshList(boolean clearErrors)
public java.lang.String refreshList()
public java.lang.String executeQuery() throws ClientException
ClientException
public void setQuery(Query newQuery)
newQuery
- The query used to retrieve the modelpublic Query getQuery()
public java.lang.String getName()
public void setName(java.lang.String name)
public void setType(java.lang.String typeName)
BPCListHandler
. If both the 'type' property of the
BPCListHandler
and the 'type' property of the query are set, an assertion is
thrown if they differ. This property is optional.
typeName
- The model typepublic java.lang.String getType()
public java.lang.Object getItem()
action
attribute of the
ColumnTag
. If called in any other context,
the item might no longer be valid.
public java.util.List getSelectedItems()
getItem
method, this
method returns all items for which checkboxes in the list are selected
(getItem
returns the single item that has been selected by clicking
on its link in the associated list).
getSelectedItems
in interface ItemProvider
public java.util.List getItemListener()
ItemListener
objects.
public void setItemListener(java.util.List list)
ItemListener
objects. For example, this method is
called if ItemListeners
are specified as the managed-bean-property of a
BPCListHandler
instance in a faces configuration file. It overwrites any
ItemListener
objects that have been set using the addItemListener
method.
list
- The list of ItemListener objectspublic void addItemListener(ItemListener listener)
ItemListener
object to the list of ItemListener
objects.
listener
- An ItemListenerpublic java.util.Map getErrors()
getErrors
in interface ErrorHandler
public void setErrors(java.util.Map errors)
DetailsComponent
.
setErrors
in interface ErrorHandler
errors
- The errors that occurred while processing commandspublic Message getQueryMessage()
public com.ibm.bpe.jsf.handler.BPCListHandlerPagingHelper getPagingHelper()
public com.ibm.bpe.jsf.handler.BPCListHandlerSelectionHelper getSelectionHelper()
public com.ibm.bpe.jsf.handler.BPCListHandlerSortHelper getSortHelper()
public boolean getNotEmpty()
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |