|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase com.sun.rave.web.ui.component.TableRowGroupBase
Use the ui:tableRowGroup
tag to define the rows of a table, inside a ui:table
tag. A table must include at least one tableRowGroup component to
contain the table row content.
The ui:table
tag is
used to define the structure and actions of the table, and is a
container for ui:tableRowGroup
tags. The ui:tableRowGroup
tag is a container for ui:tableColumn
tags, which are used
to define the
columns of the table. The documentation
for the
ui:table
tag contains detailed information
about the table component. This page provides details about how
to create table rows only.
When you use one ui:tableRowGroup
tag in the ui:table
tag, you create a basic table.
Examples of basic tables are shown in the ui:table
tag documentation. When
you use multiple ui:tableRowGroup
tags, you create a
group table, which is discussed in detail in this document.
<tr>
elements, which
are used
to display rows of data. You can specify multiple ui:tableRowGroup
tags to create groups of rows. Each group is visually separate from the
other groups, but all rows of the table can be sorted and filtered at
once, within their respective groups. headerText
and tableFooterText
attributes of the ui:tableColumn
tags. To ensure that these headers and footers are rendered only once,
you should define the
headerText
and tableFooterText
attributes only in the ui:tableColumn
tags inside the
first ui:tableRowGroup
tag in the
table. See the ui:tableColumn
documentation for more
information. ui:tableRowGroup
tags. This diagram
depicts two row groups.Title Bar | ||||||||||||||||||||
Action Bar (top) | ||||||||||||||||||||
|
||||||||||||||||||||
Action Bar (bottom) | ||||||||||||||||||||
Footer
|
headerText
attribute. You can
specify a separate component to provide header content by using the header
facet, which overrides the headerText
attribute.
You can
use the following ui:tableRowGroup
attributes to change
the appearance of the group header:aboveColumnHeader
set to true makes the group header display above the column header.
selectMultipleToggleButton
set to true adds a checkbox that allows users to
select and deselect all rows in the group
collapsed
set to true causes the group to be rendered with the rows hidden, and
only the group header is visible.
groupToggleButton
set to true adds a button image that allows users to expand and
collapse
the group of rows. When the group collapses, all the rows are hidden
and only the header is visible.
extraHeaderHtml
can be used to append HTML code to the <tr>
element
that is rendered for the group header
The Group Footer Bar
displays an optional footer below each group of rows. The text of the
group footer is specified with the footerText
attribute.
You can specify a separate component to provide the footer content by
using the footer
facet, which overrides the footerText
attribute. You can use the following
ui:tableRowGroup
attributes to change
the appearance of the group footer:
aboveColumnFooter
set to true makes the group footer display above the column footer. extraFooterHtml
can be used to
append HTML code to the <tr>
element that is
rendered for the group footer
The table data is specified with
the sourceData
and sourceVar
attributes.
The sourceData
attribute specifies the source of the data
that populates the table. The sourceVar
attribute
specifies the name of the request-scope variable to use for exposing
the model data when iterating over table rows. Each table in a JSP page
must use a unique sourceVar
value. See the Life Cycle section for more information about
these attributes.
ui:tableRowGroup
tag supports the following facets,
which
allow you to customize the
layout of the component.Facet
Name
|
Table Item
Implemented by the Facet |
footer
|
Footer that applies to the group of rows defined by the ui:tableRowGroup
tag. This facet can be used to replace the default footer. |
header |
Header that applies to the group of rows defined by the ui:tableRowGroup
tag. This facet can be used to replace the default header. |
ui:table
tag's
JavaScript documentation.
The same functions are used for the
ui:tableRowGroup
tag.ui:tableRowGroup
tagui:table
tag is contained within a HTML <form>
element so actions can submit form data.
For basic table and sort
examples,
see the ui:table
tag documentation
and ui:tableColumn
documentation. sourceData
property of tableRowGroup is invoked at
least twice during
the JavaServer Faces life cycle. The sourceData
is
invoked once during
one of the Apply Request Values, Process Validations, or Update Model
Values phases, and once during the Render Response phase. In order to
process the
previously displayed children during the Apply Request Values, Process
Validations, or Update Model Values phases,
the table
must use the same DataProvider that was used to render the previous
page. For
example, suppose that sorting, filtering, and pagination were applied
on the previous page, and
rows 10-20 of 1000 were currently displayed. You want to update only
the currently
displayed components, rows 10-20. To do this, you must not update the
DataProvider until the Invoke Application phase or Render Response
phases, when it is safe to render new
data.Note that if the underlying
DataProvider has changed in any way, processing of the previously
displayed children might not be possible during the Apply Request
Values, Process
Validations, or Update Model Values phases. In addition, if the
DataProvider is null or empty, no children will be processed and
their processDecodes()
, processValidators()
,
and processUpdates()
methods will not be invoked. If a
component has not been decoded (in the Apply Request Values phase),
action events might not be received and component properties such as
hyperlink query parameters cannot be retrieved. Also, if a
component has not been updated (in the Update Model Values phase),
submitted values cannot be retrieved for checkboxes, radio buttons,
etc.
TableRowGroup.setSourceData
method is set. Note that a phase listener may be used to initialize the
DataProvider during the Invoke Application Phase. However, when the
underlying DataProvider has changed in any way, UI guidelines recommend
that pagination is reset to the first page. You can use the
tableRowGroup component's setFirst()
method to set the
first row to be displayed.ui:table
tag documentation. Utility
classes used in the examples are
included
in this ui:tableRowGroup
page, after the examples.
Additional examples are shown in the ui:table
and ui:tableColumn
documents.Supporting files:
ui:tableColumn
tags and the overall footer is specified in the ui:table
tag. See the diagram of the
table areas. ui:tableColumn
tags within each ui:tableRowGroup
tag to specify
functionality. For
example, the selectId
and sort
attributes allow column
headers to sort on all row groups at once. ui:table
documentation.com.sun.rave.web.ui.event.TableSelectPhaseListener
object
ensures that rows that are hidden from view are
deselected because the phase listener clears the table state after the
rendering phase. Although
pagination is not used for a group table, the TableSelectPhaseListener
object is used in this example in the Select util, which is shown in Select.java
in the ui:table
documentation. Also refer to the JavaDoc
for TableSelectPhaseListener
for more information. <!-- Group Table -->
<ui:table id="table1"
clearSortButton="true"
deselectMultipleButton="true"
selectMultipleButton="true"
sortPanelToggleButton="true"
footerText="Table Footer">
<!-- Title -->
<f:facet name="title">
<ui:staticText text="Group Table"/>
</f:facet>
<ui:tableRowGroup id="rowGroup1"
binding="#{TableBean.groupB.tableRowGroup}"
footerText="Group Footer"
headerText="Group Header"
selected="#{TableBean.groupB.select.selectedState}"
selectMultipleToggleButton="true"
sourceData="#{TableBean.groupB.names}"
sourceVar="name"
groupToggleButton="true">
<ui:tableColumn id="col0"
extraHeaderHtml="nowrap='nowrap'"
extraFooterHtml="nowrap='nowrap'"
extraTableFooterHtml="nowrap='nowrap'"
footerText="ColFtr"
selectId="select"
sort="#{TableBean.groupB.select.selectedState}">
<ui:checkbox id="select"
onClick="setTimeout('initAllRows()', 0)"
selected="#{TableBean.groupB.select.selected}"
selectedValue="#{TableBean.groupB.select.selectedValue}"/>
</ui:tableColumn>
<ui:tableColumn id="col1"
extraHeaderHtml="nowrap='nowrap'"
alignKey="last"
footerText="Column Footer"
headerText="Last Name"
rowHeader="true"
sort="last">
<ui:staticText
text="#{name.value.last}"/>
</ui:tableColumn>
<ui:tableColumn id="col2"
alignKey="first"
footerText="Column Footer"
headerText="First Name"
sort="first">
<ui:staticText
text="#{name.value.first}"/>
</ui:tableColumn>
</ui:tableRowGroup>
<ui:tableRowGroup id="rowGroup2"
binding="#{TableBean.groupC.tableRowGroup}"
collapsed="true"
selected="#{TableBean.groupC.select.selectedState}"
selectMultipleToggleButton="true"
sourceData="#{TableBean.groupC.names}"
sourceVar="name"
groupToggleButton="true">
<!-- Row group header -->
<f:facet name="header">
<ui:panelGroup id="groupHeader">
<ui:markup tag="span"
extraAttributes="class='TblGrpLft'">
<ui:staticText styleClass="TblGrpTxt" text="Group Header"/>
</ui:markup>
<ui:markup tag="span"
extraAttributes="class='TblGrpRt'">
<ui:staticText styleClass="TblGrpMsgTxt" text="Right-Aligned
Text"/>
</ui:markup>
</ui:panelGroup>
</f:facet>
<!-- Row group footer -->
<f:facet name="footer">
<ui:staticText
styleClass="TblGrpFtrRowTxt" text="Group Footer"/>
</f:facet>
<ui:tableColumn id="col0"
extraHeaderHtml="nowrap='nowrap'"
extraFooterHtml="nowrap='nowrap'"
extraTableFooterHtml="nowrap='nowrap'"
footerText="ColFtr"
selectId="select"
sort="#{TableBean.groupC.select.selectedState}"
tableFooterText="TblColFtr">
<ui:checkbox id="select"
onClick="setTimeout('initAllRows()', 0)"
selected="#{TableBean.groupC.select.selected}"
selectedValue="#{TableBean.groupC.select.selectedValue}"/>
</ui:tableColumn>
<ui:tableColumn id="col1"
alignKey="last"
footerText="Column Footer"
rowHeader="true"
sort="last"
tableFooterText="Table
Column Footer">
<ui:staticText
text="#{name.value.last}"/>
</ui:tableColumn>
<ui:tableColumn id="col2"
alignKey="first"
footerText="Column Footer"
sort="first"
tableFooterText="Table
Column Footer">
<ui:staticText
text="#{name.value.first}"/>
</ui:tableColumn>
</ui:tableRowGroup>
</ui:table>
select.js
file used in the example above.
// Use this function to initialize all rows displayed in the table when
the
// state of selected components change (i.e., checkboxes or
radiobuttons used to
// de/select rows of the table). This functionality requires the
selectId
// property of the tableColumn component to be set.
//
// Note: Use setTimeout when invoking this function. This will ensure
that
// checkboxes and radiobutton are selected immediately, instead of
waiting for
// the onClick event to complete. For example:
//
// onClick="setTimeout('initAllRows(); disableActions()', 0)"
function initAllRows() {
// Disable table actions by default.
var table = document.getElementById("form1:table1");
table.initAllRows();
}
ui:table
tag to create a binding to a backing
bean to
dynamically create a table layout. The dynamic table is created as
needed and can be changed each time the page is rendered. <ui:table id="table1"
binding="#{DynamicTableBean.table}"/>
The backing bean,
DynamicTableBean, is
shown in the following DynamicTableBean.java
class. This bean is used only to
create the table layout, and shows how to use the tableRowGroup
component directly
through Java code instead of through the JSP tag ui:tableRowGroup.
The Dynamic.java
utility class provides the functionality for adding properties to the
table. The table
also uses methods that are
defined in the TableBean
shown in the ui:table
documentation.
DynamicTableBean.java Backing Beanpackage table;
import com.sun.rave.web.ui.component.Table;
import com.sun.rave.web.ui.component.TableRowGroup;
import table.util.Dynamic;
// Backing bean for dynamic table examples.
//
// Note: To simplify the example, this bean is used only to create the
table
// layout. The resulting table will use methods already defined in
TableBean.
public class DynamicTableBean {
private Dynamic dynamic = null; // Dynamic util.
private Table table = null; // Table component.
// Default constructor.
public DynamicTableBean() {
dynamic = new Dynamic();
}
// Get Table component.
public Table getTable() {
if (table == null) {
//
Get table row group.
TableRowGroup rowGroup1 = dynamic.getTableRowGroup("rowGroup1",
"#{TableBean.groupB.names}",
"#{TableBean.groupB.select.selectedState}", null);
//
Set table row group properties.
dynamic.setTableRowGroupChildren(rowGroup1,
"#{TableBean.groupB.select.selectedState}",
"#{TableBean.groupB.select.selected}",
"#{TableBean.groupB.select.selectedValue}",
"#{TableBean.groupB.actions.action}", true);
//
Get table.
table = dynamic.getTable("table1", "Dynamic Table");
table.getChildren().add(rowGroup1);
}
return table;
}
// Set Table component.
//
// @param table The Table component.
public void setTable(Table table) {
this.table = table;
}
}
ui:table
tag to create a binding to a backing
bean to
dynamically create a group table layout. The dynamic group table is created
as
needed and can be changed each time the page is rendered.<ui:table id="table1"
binding="#{DynamicGroupTableBean.table}"/>
The backing bean,
DynamicGroupTableBean, is
shown in the following DynamicGroupTableBean.java
class. This bean is used only to
create the table layout, and shows how to use the tableRowGroup
component directly
through Java code instead of through the JSP tag ui:tableRowGroup.
The Dynamic.java
utility
class provides the functionality for adding
properties to the table. The table also
uses methods that are
defined in the TableBean
shown in the ui:table
documentation.
DynamicGroupTableBean.java Backing Beanpackage table;
import table.util.Dynamic;
import com.sun.rave.web.ui.component.StaticText;
import com.sun.rave.web.ui.component.Table;
import com.sun.rave.web.ui.component.TableRowGroup;
// Backing bean for dynamic group table examples.
//
// Note: To simplify the example, this bean is used only to create the
table
// layout. The resulting table will use methods already defined in
TableBean.
public class DynamicGroupTableBean {
private Dynamic dynamic = null; // Dynamic util.
private Table table = null; // Table component.
// Default constructor.
public DynamicGroupTableBean() {
dynamic = new Dynamic();
}
// Get Table component.
public Table getTable() {
if (table == null) {
//
Get table row group.
TableRowGroup rowGroup1 = dynamic.getTableRowGroup("rowGroup1",
"#{TableBean.groupB.names}",
"#{TableBean.groupB.select.selectedState}",
"Group Header");
TableRowGroup rowGroup2 = dynamic.getTableRowGroup("rowGroup2",
"#{TableBean.groupC.names}",
"#{TableBean.groupC.select.selectedState}",
"Group Header");
//
Set table row group properties.
dynamic.setTableRowGroupChildren(rowGroup1,
"#{TableBean.groupB.select.selectedState}",
"#{TableBean.groupB.select.selected}",
"#{TableBean.groupB.select.selectedValue}", null, true);
dynamic.setTableRowGroupChildren(rowGroup2,
"#{TableBean.groupC.select.selectedState}",
"#{TableBean.groupC.select.selected}",
"#{TableBean.groupC.select.selectedValue}", null, false);
//
Set select and row group toggle buttons.
rowGroup1.setSelectMultipleToggleButton(true);
rowGroup2.setSelectMultipleToggleButton(true);
rowGroup1.setGroupToggleButton(true);
rowGroup2.setGroupToggleButton(true);
//
Get table.
table = dynamic.getTable("table1", null);
table.getChildren().add(rowGroup1);
table.getChildren().add(rowGroup2);
//
Add title facet.
StaticText title = new StaticText();
title.setText("Dynamic Group Table");
table.getFacets().put(Table.TITLE_FACET, title);
}
return table;
}
// Set Table component.
//
// @param table The Table component.
public void setTable(Table table) {
this.table = table;
}
}
faces_config.xml
file.<!DOCTYPE faces-config PUBLIC
'-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.0//EN'
'http://java.sun.com/dtd/web-facesconfig_1_1.dtd'>
<faces-config>
<managed-bean>
<description>Backing
bean for the group table example</description>
<managed-bean-name>TableBean</managed-bean-name>
<managed-bean-class>table.TableBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>Backing
bean for the dynamic table example</description>
<managed-bean-name>DynamicTableBean</managed-bean-name>
<managed-bean-class>table.DynamicTableBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>Backing
bean for the dynamic group table example</description>
<managed-bean-name>DynamicGroupTableBean</managed-bean-name>
<managed-bean-class>table.DynamicGroupTableBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>
ui:table
documentation, and used in the examples for the table
tags ui:table
, ui:tableRowGroup
, and ui:tableColumn.
Group.java
package table.util;
import com.sun.rave.web.ui.component.Checkbox;
import com.sun.rave.web.ui.component.Hyperlink;
import com.sun.rave.web.ui.component.StaticText;
import com.sun.rave.web.ui.component.Table;
import com.sun.rave.web.ui.component.TableColumn;
import com.sun.rave.web.ui.component.TableRowGroup;
import javax.faces.context.FacesContext;
import javax.faces.component.UIComponent;
import javax.faces.component.UIParameter;
import javax.faces.el.ValueBinding;
// This class provides functionality for dynamic tables.
public class Dynamic {
public static final String CHECKBOX_ID = "select";
public static final String HYPERLINK_ID = "link";
// Default constructor.
public Dynamic() {
}
// Note: When using tags in a JSP page,
UIComponentTag automatically creates
// a unique id for the component. However, when
dynamically creating
// components, via a backing bean, the id has not
been set. In this
// scenario, allowing JSF to create unique Ids may
cause problems with
// Javascript and components may not be able to
maintain state properly.
// For example, if a component was assigned "_id6"
as an id, that means
// there were 5 other components that also have
auto-generated ids. Let us
// assume one of those components was a complex
component that, as part of
// its processing, adds an additional non-id'd child
before redisplaying the
// view. Now, the id of this component will be
"_id7" instead of "_id6".
// Assigning your own id ensures that conflicts do
not occur.
// Get Table component.
//
// @param id The component id.
// @param title The table title text.
public Table getTable(String id, String title) {
// Get table.
Table table = new Table();
table.setDeselectMultipleButton(true); // Show deselect multiple button.
table.setSelectMultipleButton(true); // Show select multiple button.
table.setTitle(title); //
Set title text.
return table;
}
// Get TableRowGroup component with header.
//
// @param id The component id.
// @param sourceData Value binding expression for
model data.
// @param selected Value binding expression for
selected property.
// @param header Value binding expression for row
group header text.
public TableRowGroup getTableRowGroup(String id,
String sourceData,
String selected, String header) {
// Get table row group.
TableRowGroup rowGroup = new
TableRowGroup();
rowGroup.setId(id); // Set
id.
rowGroup.setSourceVar("name"); // Set source var.
rowGroup.setHeaderText(header); // Set header text.
setValueBinding(rowGroup,
"selected", selected); // Set row highlight.
setValueBinding(rowGroup,
"sourceData", sourceData); // Set source data.
return rowGroup;
}
// Get TableColumn component.
//
// @param id The component id.
// @param sort Value binding expression for column
sort.
// @param align The field key for column alignment.
// @param header The column header text.
// @param selectId The component id used to select
table rows.
public TableColumn getTableColumn(String id, String
sort, String align,
String header, String selectId) {
// Get table column.
TableColumn col = new
TableColumn();
col.setId(id); // Set id.
col.setSelectId(selectId);
// Set id used to select table rows.
col.setHeaderText(header);
// Set header text.
col.setAlignKey(align); //
Set align key.
setValueBinding(col, "sort",
sort); // Set sort.
return col;
}
// Get Checkbox component used for select column.
//
// @param id The component id.
// @param selected Value binding expression for
selected property.
// @param selectedValue Value binding expression for
selectedValue property.
public Checkbox getCheckbox(String id, String
selected,
String selectedValue) {
// Get checkbox.
Checkbox cb = new Checkbox();
cb.setId(id); // Set id here
and set row highlighting below.
cb.setOnClick("setTimeout('initAllRows()', 0)");
setValueBinding(cb,
"selected", selected); // Set selected.
setValueBinding(cb,
"selectedValue", selectedValue); // Set selected value.
return cb;
}
// Get Hyperlink component.
//
// @param id The component id.
// @param text Value binding expression for text.
// @param action Method binding expression for
action.
// @param parameter Value binding expression for
parameter.
public Hyperlink getHyperlink(String id, String
text, String action,
String parameter) {
// Get hyperlink.
Hyperlink hyperlink = new
Hyperlink();
hyperlink.setId(id); // Set
id.
setValueBinding(hyperlink,
"text", text); // Set text.
setMethodBinding(hyperlink,
"action", action); // Set action.
// Create paramerter.
UIParameter param = new
UIParameter();
param.setId(id + "_param");
param.setName("param");
setValueBinding(param,
"value", parameter); // Set parameter.
hyperlink.getChildren().add(param);
return hyperlink;
}
// Get StaticText component.
//
// @param text Value binding expression for text.
public StaticText getText(String text) {
// Get static text.
StaticText staticText = new
StaticText();
setValueBinding(staticText,
"text", text); // Set text.
return staticText;
}
// Set TableRowGroup children.
//
// @param rowGroup The TableRowGroup component.
// @param cbSort Value binding expression for cb
sort.
// @param cbSelected Value binding expression for cb
selected property.
// @param cbSelectedValue Value binding expression
for cb selectedValue property.
// @param action The Method binding expression for
hyperlink action.
// @param showHeader Flag indicating to display
column header text.
public void setTableRowGroupChildren(TableRowGroup
rowGroup, String cbSort,
String cbSelected, String
cbSelectedValue, String action,
boolean showHeader) {
// UI guidelines recomend no
headers for second row group.
String header1 = showHeader
? "Last Name" : null;
String header2 = showHeader
? "First Name" : null;
// Get columns.
TableColumn col1 =
getTableColumn(
"col0", cbSort, null, null, CHECKBOX_ID);
TableColumn col2 =
getTableColumn(
"col1", "#{name.value.last}", "last", header1,
null);
TableColumn col3 =
getTableColumn(
"col2", "#{name.value.first}", "first", header2, null);
// Get column components.
Checkbox cb =
getCheckbox(CHECKBOX_ID, cbSelected, cbSelectedValue);
StaticText firstName =
getText("#{name.value.first}");
// If action was provided,
add a hyperlink; otherwise, use static text.
if (action != null) {
Hyperlink lastName = getHyperlink(HYPERLINK_ID,
"#{name.value.last}", action,
"#{name.value.last}");
col2.getChildren().add(lastName);
} else {
StaticText lastName = getText("#{name.value.last}");
col2.getChildren().add(lastName);
}
// Add Children.
col1.getChildren().add(cb);
col3.getChildren().add(firstName);
rowGroup.getChildren().add(col1);
rowGroup.getChildren().add(col2);
rowGroup.getChildren().add(col3);
}
// Helper method to set value bindings.
//
// @param component The UIComponent to set a value
binding for.
// @param name The name of the value binding.
// @param value The value of the value binding.
protected void setValueBinding(UIComponent
component, String name,
String value) {
if (value == null) {
return;
}
FacesContext context =
FacesContext.getCurrentInstance();
component.setValueBinding(name, context.getApplication().
createValueBinding(value));
}
// Helper method to set method bindings.
//
// @param component The UIComponent to set a value
binding for.
// @param name The name of the method binding.
// @param action The action of the method binding.
protected void setMethodBinding(UIComponent
component, String name,
String action) {
if (action == null) {
return;
}
FacesContext context =
FacesContext.getCurrentInstance();
component.getAttributes().put(name, context.getApplication().
createMethodBinding(action, new Class[0]));
}
}
Auto-generated component class. Do NOT modify; all changes will be lost!
Constructor Summary | |
TableRowGroupBase()
Construct a new TableRowGroupBase . |
Method Summary | |
java.lang.String |
getAlign()
Sets the horizontal alignment (left, right, justify, center) for the cell contents |
java.lang.String |
getBgColor()
|
java.lang.String |
getChar()
|
java.lang.String |
getCharOff()
|
java.lang.String |
getEmptyDataMsg()
The text to be displayed when the table does not contain data. |
java.lang.String |
getExtraFooterHtml()
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group footer. |
java.lang.String |
getExtraHeaderHtml()
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group header. |
java.lang.String |
getFamily()
Return the family for this component. |
int |
getFirst()
Use the first attribute to specify which row should be the first
to be displayed. |
java.lang.String |
getFooterText()
The text to be displayed in the group footer. |
java.lang.String |
getHeaderText()
The text to be displayed in the group header. |
java.lang.String |
getOnClick()
Scripting code executed when a mouse click occurs over this component. |
java.lang.String |
getOnDblClick()
Scripting code executed when a mouse double click occurs over this component. |
java.lang.String |
getOnKeyDown()
Scripting code executed when the user presses down on a key while the component has focus. |
java.lang.String |
getOnKeyPress()
Scripting code executed when the user presses and releases a key while the component has focus. |
java.lang.String |
getOnKeyUp()
Scripting code executed when the user releases a key while the component has focus. |
java.lang.String |
getOnMouseDown()
Scripting code executed when the user presses a mouse button while the mouse pointer is on the component. |
java.lang.String |
getOnMouseMove()
Scripting code executed when the user moves the mouse pointer while over the component. |
java.lang.String |
getOnMouseOut()
Scripting code executed when a mouse out movement occurs over this component. |
java.lang.String |
getOnMouseOver()
Scripting code executed when the user moves the mouse pointer into the boundary of this component. |
java.lang.String |
getOnMouseUp()
Scripting code executed when the user releases a mouse button while the mouse pointer is on the component. |
int |
getRows()
The number of rows per page to be displayed for a paginated table. |
com.sun.data.provider.TableDataProvider |
getSourceData()
The sourceData attribute is used to specify the data source to
populate the table. |
java.lang.String |
getSourceVar()
Use the sourceVar attribute to specify the name of the
request-scope attribute under which model data for the current row will be
exposed when iterating. |
java.lang.String |
getStyleClasses()
Use the styleClasses attribute to specify a list of CSS style
classes to apply to the rows of the group. |
com.sun.data.provider.TableDataFilter |
getTableDataFilter()
The tableDataFilter attribute is used to define filter critera and
mechanism for filtering the contents of a TableDataProvider. |
com.sun.data.provider.TableDataSorter |
getTableDataSorter()
The tableDataSorter attribute is used to define sort critera and
the mechanism for sorting the contents of a TableDataProvider. |
java.lang.String |
getToolTip()
Display the text as a tooltip for this component |
java.lang.String |
getValign()
Vertical alignment (top, middle, bottom) for the content of each cell in the column |
boolean |
isAboveColumnFooter()
Set the aboveColumnFooter attribute to true to display the group
footer bar above the column footers bar. |
boolean |
isAboveColumnHeader()
Set the aboveColumnHeader attribute to true to display the group
header bar above the column headers bar. |
boolean |
isCollapsed()
Use the collapsed attribute to initially render the group as collapsed, so that the data rows are hidden and only the header row is visible. |
boolean |
isGroupToggleButton()
Use the groupToggleButton attribute to display a button in the
group header to allow users to collapse and expand the group of rows. |
boolean |
isMultipleColumnFooters()
Use the multipleColumnFooters attribute when the
ui:tableRowGroup contains nested ui:tableColumn tags,
and you want the footers of all the ui:tableColumn tags to be
shown. |
boolean |
isMultipleTableColumnFooters()
Use the multipleTableColumnFooters attribute when the
ui:tableRowGroup contains nested ui:tableColumn tags,
and you want the table footers of all the ui:tableColumn tags to
be shown. |
boolean |
isSelected()
Flag indicating that the current row is selected. |
boolean |
isSelectMultipleToggleButton()
Use the selectMultipleToggleButton attribute to display a button
in the group header to allow users to select all rows of the group at once. |
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 |
setAboveColumnFooter(boolean aboveColumnFooter)
Set the aboveColumnFooter attribute to true to display the group
footer bar above the column footers bar. |
void |
setAboveColumnHeader(boolean aboveColumnHeader)
Set the aboveColumnHeader attribute to true to display the group
header bar above the column headers bar. |
void |
setAlign(java.lang.String align)
Sets the horizontal alignment (left, right, justify, center) for the cell contents |
void |
setBgColor(java.lang.String bgColor)
|
void |
setChar(java.lang.String _char)
|
void |
setCharOff(java.lang.String charOff)
|
void |
setCollapsed(boolean collapsed)
Use the collapsed attribute to initially render the group as collapsed, so that the data rows are hidden and only the header row is visible. |
void |
setEmptyDataMsg(java.lang.String emptyDataMsg)
The text to be displayed when the table does not contain data. |
void |
setExtraFooterHtml(java.lang.String extraFooterHtml)
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group footer. |
void |
setExtraHeaderHtml(java.lang.String extraHeaderHtml)
Extra HTML code to be appended to the <tr> HTML element that
is rendered for the group header. |
void |
setFirst(int first)
Use the first attribute to specify which row should be the first
to be displayed. |
void |
setFooterText(java.lang.String footerText)
The text to be displayed in the group footer. |
void |
setGroupToggleButton(boolean groupToggleButton)
Use the groupToggleButton attribute to display a button in the
group header to allow users to collapse and expand the group of rows. |
void |
setHeaderText(java.lang.String headerText)
The text to be displayed in the group header. |
void |
setMultipleColumnFooters(boolean multipleColumnFooters)
Use the multipleColumnFooters attribute when the
ui:tableRowGroup contains nested ui:tableColumn tags,
and you want the footers of all the ui:tableColumn tags to be
shown. |
void |
setMultipleTableColumnFooters(boolean multipleTableColumnFooters)
Use the multipleTableColumnFooters attribute when the
ui:tableRowGroup contains nested ui:tableColumn tags,
and you want the table footers of all the ui:tableColumn tags to
be shown. |
void |
setOnClick(java.lang.String onClick)
Scripting code executed when a mouse click occurs over this component. |
void |
setOnDblClick(java.lang.String onDblClick)
Scripting code executed when a mouse double click occurs over this component. |
void |
setOnKeyDown(java.lang.String onKeyDown)
Scripting code executed when the user presses down on a key while the component has focus. |
void |
setOnKeyPress(java.lang.String onKeyPress)
Scripting code executed when the user presses and releases a key while the component has focus. |
void |
setOnKeyUp(java.lang.String onKeyUp)
Scripting code executed when the user releases a key while the component has focus. |
void |
setOnMouseDown(java.lang.String onMouseDown)
Scripting code executed when the user presses a mouse button while the mouse pointer is on the component. |
void |
setOnMouseMove(java.lang.String onMouseMove)
Scripting code executed when the user moves the mouse pointer while over the component. |
void |
setOnMouseOut(java.lang.String onMouseOut)
Scripting code executed when a mouse out movement occurs over this component. |
void |
setOnMouseOver(java.lang.String onMouseOver)
Scripting code executed when the user moves the mouse pointer into the boundary of this component. |
void |
setOnMouseUp(java.lang.String onMouseUp)
Scripting code executed when the user releases a mouse button while the mouse pointer is on the component. |
void |
setRows(int rows)
The number of rows per page to be displayed for a paginated table. |
void |
setSelected(boolean selected)
Flag indicating that the current row is selected. |
void |
setSelectMultipleToggleButton(boolean selectMultipleToggleButton)
Use the selectMultipleToggleButton attribute to display a button
in the group header to allow users to select all rows of the group at once. |
void |
setSourceData(com.sun.data.provider.TableDataProvider sourceData)
The sourceData attribute is used to specify the data source to
populate the table. |
void |
setSourceVar(java.lang.String sourceVar)
Use the sourceVar attribute to specify the name of the
request-scope attribute under which model data for the current row will be
exposed when iterating. |
void |
setStyleClasses(java.lang.String styleClasses)
Use the styleClasses attribute to specify a list of CSS style
classes to apply to the rows of the group. |
void |
setTableDataFilter(com.sun.data.provider.TableDataFilter tableDataFilter)
The tableDataFilter attribute is used to define filter critera and
mechanism for filtering the contents of a TableDataProvider. |
void |
setTableDataSorter(com.sun.data.provider.TableDataSorter tableDataSorter)
The tableDataSorter attribute is used to define sort critera and
the mechanism for sorting the contents of a TableDataProvider. |
void |
setToolTip(java.lang.String toolTip)
Display the text as a tooltip for this component |
void |
setValign(java.lang.String valign)
Vertical alignment (top, middle, bottom) for the content of each cell in the column |
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 |
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, 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 |
Constructor Detail |
public TableRowGroupBase()
Construct a new TableRowGroupBase
.
Method Detail |
public java.lang.String getFamily()
Return the family for this component.
public boolean isAboveColumnFooter()
Set the aboveColumnFooter
attribute to true to display the group
footer bar above the column footers bar. The default is to display the group
footer below the column footers.
public void setAboveColumnFooter(boolean aboveColumnFooter)
Set the aboveColumnFooter
attribute to true to display the group
footer bar above the column footers bar. The default is to display the group
footer below the column footers.
isAboveColumnFooter()
public boolean isAboveColumnHeader()
Set the aboveColumnHeader
attribute to true to display the group
header bar above the column headers bar. The default is to display the group
header below the column headers.
public void setAboveColumnHeader(boolean aboveColumnHeader)
Set the aboveColumnHeader
attribute to true to display the group
header bar above the column headers bar. The default is to display the group
header below the column headers.
isAboveColumnHeader()
public java.lang.String getAlign()
Sets the horizontal alignment (left, right, justify, center) for the cell contents
public void setAlign(java.lang.String align)
Sets the horizontal alignment (left, right, justify, center) for the cell contents
getAlign()
public java.lang.String getBgColor()
public void setBgColor(java.lang.String bgColor)
public java.lang.String getChar()
public void setChar(java.lang.String _char)
public java.lang.String getCharOff()
public void setCharOff(java.lang.String charOff)
public boolean isCollapsed()
Use the collapsed attribute to initially render the group as collapsed, so that the data rows are hidden and only the header row is visible. The default is to show the group expanded.
public void setCollapsed(boolean collapsed)
Use the collapsed attribute to initially render the group as collapsed, so that the data rows are hidden and only the header row is visible. The default is to show the group expanded.
isCollapsed()
public java.lang.String getEmptyDataMsg()
The text to be displayed when the table does not contain data. The text is
displayed left-aligned in a single row that contains one cell that spans all
columns. The emptyDataMsg
text might be something similar to "No
items found." If users can add items to the table, the message might include
instructions, such as "This table contains no files. To add a file to monitor,
click the New button."
public void setEmptyDataMsg(java.lang.String emptyDataMsg)
The text to be displayed when the table does not contain data. The text is
displayed left-aligned in a single row that contains one cell that spans all
columns. The emptyDataMsg
text might be something similar to "No
items found." If users can add items to the table, the message might include
instructions, such as "This table contains no files. To add a file to monitor,
click the New button."
getEmptyDataMsg()
public java.lang.String getExtraFooterHtml()
Extra HTML code to be appended to the <tr>
HTML element that
is rendered for the group footer. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
public void setExtraFooterHtml(java.lang.String extraFooterHtml)
Extra HTML code to be appended to the <tr>
HTML element that
is rendered for the group footer. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
getExtraFooterHtml()
public java.lang.String getExtraHeaderHtml()
Extra HTML code to be appended to the <tr>
HTML element that
is rendered for the group header. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
public void setExtraHeaderHtml(java.lang.String extraHeaderHtml)
Extra HTML code to be appended to the <tr>
HTML element that
is rendered for the group header. Use only code that is valid in an HTML
<td>
element. The code you specify is inserted in the HTML
element, and is not checked for validity. For example, you might set this
attribute to "nowrap=`nowrap'"
.
getExtraHeaderHtml()
public int getFirst()
Use the first
attribute to specify which row should be the first
to be displayed. This value is used only when the table is paginated. By
default, the first row (0) is displayed first. The value of this property is
maintained as part of the table's state, and the value is updated when the user
clicks on buttons to page through the table.
public void setFirst(int first)
Use the first
attribute to specify which row should be the first
to be displayed. This value is used only when the table is paginated. By
default, the first row (0) is displayed first. The value of this property is
maintained as part of the table's state, and the value is updated when the user
clicks on buttons to page through the table.
getFirst()
public java.lang.String getFooterText()
The text to be displayed in the group footer.
public void setFooterText(java.lang.String footerText)
The text to be displayed in the group footer.
getFooterText()
public boolean isGroupToggleButton()
Use the groupToggleButton
attribute to display a button in the
group header to allow users to collapse and expand the group of rows.
public void setGroupToggleButton(boolean groupToggleButton)
Use the groupToggleButton
attribute to display a button in the
group header to allow users to collapse and expand the group of rows.
isGroupToggleButton()
public java.lang.String getHeaderText()
The text to be displayed in the group header.
public void setHeaderText(java.lang.String headerText)
The text to be displayed in the group header.
getHeaderText()
public boolean isMultipleColumnFooters()
Use the multipleColumnFooters
attribute when the
ui:tableRowGroup
contains nested ui:tableColumn
tags,
and you want the footers of all the ui:tableColumn
tags to be
shown. The default is to show the footers of only the innermost level of nested
ui:tableColumn
tags.
public void setMultipleColumnFooters(boolean multipleColumnFooters)
Use the multipleColumnFooters
attribute when the
ui:tableRowGroup
contains nested ui:tableColumn
tags,
and you want the footers of all the ui:tableColumn
tags to be
shown. The default is to show the footers of only the innermost level of nested
ui:tableColumn
tags.
isMultipleColumnFooters()
public boolean isMultipleTableColumnFooters()
Use the multipleTableColumnFooters
attribute when the
ui:tableRowGroup
contains nested ui:tableColumn
tags,
and you want the table footers of all the ui:tableColumn
tags to
be shown. The default is to show the table footers of only the innermost level
of nested ui:tableColumn
tags.
public void setMultipleTableColumnFooters(boolean multipleTableColumnFooters)
Use the multipleTableColumnFooters
attribute when the
ui:tableRowGroup
contains nested ui:tableColumn
tags,
and you want the table footers of all the ui:tableColumn
tags to
be shown. The default is to show the table footers of only the innermost level
of nested ui:tableColumn
tags.
isMultipleTableColumnFooters()
public java.lang.String getOnClick()
Scripting code executed when a mouse click occurs over this component.
public void setOnClick(java.lang.String onClick)
Scripting code executed when a mouse click occurs over this component.
getOnClick()
public java.lang.String getOnDblClick()
Scripting code executed when a mouse double click occurs over this component.
public void setOnDblClick(java.lang.String onDblClick)
Scripting code executed when a mouse double click occurs over this component.
getOnDblClick()
public java.lang.String getOnKeyDown()
Scripting code executed when the user presses down on a key while the component has focus.
public void setOnKeyDown(java.lang.String onKeyDown)
Scripting code executed when the user presses down on a key while the component has focus.
getOnKeyDown()
public java.lang.String getOnKeyPress()
Scripting code executed when the user presses and releases a key while the component has focus.
public void setOnKeyPress(java.lang.String onKeyPress)
Scripting code executed when the user presses and releases a key while the component has focus.
getOnKeyPress()
public java.lang.String getOnKeyUp()
Scripting code executed when the user releases a key while the component has focus.
public void setOnKeyUp(java.lang.String onKeyUp)
Scripting code executed when the user releases a key while the component has focus.
getOnKeyUp()
public java.lang.String getOnMouseDown()
Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
public void setOnMouseDown(java.lang.String onMouseDown)
Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
getOnMouseDown()
public java.lang.String getOnMouseMove()
Scripting code executed when the user moves the mouse pointer while over the component.
public void setOnMouseMove(java.lang.String onMouseMove)
Scripting code executed when the user moves the mouse pointer while over the component.
getOnMouseMove()
public java.lang.String getOnMouseOut()
Scripting code executed when a mouse out movement occurs over this component.
public void setOnMouseOut(java.lang.String onMouseOut)
Scripting code executed when a mouse out movement occurs over this component.
getOnMouseOut()
public java.lang.String getOnMouseOver()
Scripting code executed when the user moves the mouse pointer into the boundary of this component.
public void setOnMouseOver(java.lang.String onMouseOver)
Scripting code executed when the user moves the mouse pointer into the boundary of this component.
getOnMouseOver()
public java.lang.String getOnMouseUp()
Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
public void setOnMouseUp(java.lang.String onMouseUp)
Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
getOnMouseUp()
public int getRows()
The number of rows per page to be displayed for a paginated table. The default value is 25 per page.
public void setRows(int rows)
The number of rows per page to be displayed for a paginated table. The default value is 25 per page.
getRows()
public boolean isSelectMultipleToggleButton()
Use the selectMultipleToggleButton
attribute to display a button
in the group header to allow users to select all rows of the group at once.
The button toggles a column of checkboxes using the id that is given to the
selectId
attribute of the ui:tableColumn
tag.
public void setSelectMultipleToggleButton(boolean selectMultipleToggleButton)
Use the selectMultipleToggleButton
attribute to display a button
in the group header to allow users to select all rows of the group at once.
The button toggles a column of checkboxes using the id that is given to the
selectId
attribute of the ui:tableColumn
tag.
isSelectMultipleToggleButton()
public boolean isSelected()
Flag indicating that the current row is selected. If the value is set to true, the row will appear highlighted.
public void setSelected(boolean selected)
Flag indicating that the current row is selected. If the value is set to true, the row will appear highlighted.
isSelected()
public com.sun.data.provider.TableDataProvider getSourceData()
The sourceData
attribute is used to specify the data source to
populate the table. The value of the sourceData
attribute must be
a JavaServer Faces EL expression that resolves to a backing bean of type
com.sun.data.provider.TableDataProvider
.
The sourceData property is referenced during multiple phases of the JavaServer
Faces life cycle while iterating over the rows. The TableDataProvider object
that is bound to this attribute should be cached so that the object is not
created more often than needed.
public void setSourceData(com.sun.data.provider.TableDataProvider sourceData)
The sourceData
attribute is used to specify the data source to
populate the table. The value of the sourceData
attribute must be
a JavaServer Faces EL expression that resolves to a backing bean of type
com.sun.data.provider.TableDataProvider
.
The sourceData property is referenced during multiple phases of the JavaServer
Faces life cycle while iterating over the rows. The TableDataProvider object
that is bound to this attribute should be cached so that the object is not
created more often than needed.
getSourceData()
public java.lang.String getSourceVar()
Use the sourceVar
attribute to specify the name of the
request-scope attribute under which model data for the current row will be
exposed when iterating. During iterative processing over the rows of data in
the data provider, the TableDataProvider for the current row is exposed as a
request attribute under the key specified by this property. Note: This
value must be unique for each table in the JSP page.
public void setSourceVar(java.lang.String sourceVar)
Use the sourceVar
attribute to specify the name of the
request-scope attribute under which model data for the current row will be
exposed when iterating. During iterative processing over the rows of data in
the data provider, the TableDataProvider for the current row is exposed as a
request attribute under the key specified by this property. Note: This
value must be unique for each table in the JSP page.
getSourceVar()
public java.lang.String getStyleClasses()
Use the styleClasses
attribute to specify a list of CSS style
classes to apply to the rows of the group. You can apply all the styles in the
list to each row by separating the class names with commas. Each row looks the
same when commas are used to delimit the styles. You can apply alternating
styles to individual rows by separating the style class names with spaces. You
can create a pattern of shading alternate rows, for example, to improve
readability of the table. For example, if the list has two elements, the first
style class in the list is applied to the first row, the second class to the
second row, the first class to the third row, the second class to the fourth
row, etc. The tableRowGroup component iterates through the list of styles and
repeats from the beginning until a style is applied to each row.
public void setStyleClasses(java.lang.String styleClasses)
Use the styleClasses
attribute to specify a list of CSS style
classes to apply to the rows of the group. You can apply all the styles in the
list to each row by separating the class names with commas. Each row looks the
same when commas are used to delimit the styles. You can apply alternating
styles to individual rows by separating the style class names with spaces. You
can create a pattern of shading alternate rows, for example, to improve
readability of the table. For example, if the list has two elements, the first
style class in the list is applied to the first row, the second class to the
second row, the first class to the third row, the second class to the fourth
row, etc. The tableRowGroup component iterates through the list of styles and
repeats from the beginning until a style is applied to each row.
getStyleClasses()
public com.sun.data.provider.TableDataFilter getTableDataFilter()
The tableDataFilter
attribute is used to define filter critera and
mechanism for filtering the contents of a TableDataProvider. The value of the
tableDataFilter
attribute must be a JavaServer Faces EL expression
that resolves to a backing bean of type
com.sun.data.provider.TableDataFilter
.
public void setTableDataFilter(com.sun.data.provider.TableDataFilter tableDataFilter)
The tableDataFilter
attribute is used to define filter critera and
mechanism for filtering the contents of a TableDataProvider. The value of the
tableDataFilter
attribute must be a JavaServer Faces EL expression
that resolves to a backing bean of type
com.sun.data.provider.TableDataFilter
.
getTableDataFilter()
public com.sun.data.provider.TableDataSorter getTableDataSorter()
The tableDataSorter
attribute is used to define sort critera and
the mechanism for sorting the contents of a TableDataProvider. The value of the
tableDataSorter
attribute must be a JavaServer Faces EL expression
that resolves to a backing bean of type
com.sun.data.provider.TableDataSorter
.
public void setTableDataSorter(com.sun.data.provider.TableDataSorter tableDataSorter)
The tableDataSorter
attribute is used to define sort critera and
the mechanism for sorting the contents of a TableDataProvider. The value of the
tableDataSorter
attribute must be a JavaServer Faces EL expression
that resolves to a backing bean of type
com.sun.data.provider.TableDataSorter
.
getTableDataSorter()
public java.lang.String getToolTip()
Display the text as a tooltip for this component
public void setToolTip(java.lang.String toolTip)
Display the text as a tooltip for this component
getToolTip()
public java.lang.String getValign()
Vertical alignment (top, middle, bottom) for the content of each cell in the column
public void setValign(java.lang.String valign)
Vertical alignment (top, middle, bottom) for the content of each cell in the column
getValign()
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.
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.
isVisible()
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |