The DataGridTagModel is a JavaBean that is exposed by the NetUI data grid tag into
the
javax.servlet.jsp.PageContext in a JSP. This bean exposes state and services
which can be data bound by an expression language in a JSP.
Field Summary
final public static int
RENDER_STATE_CAPTION The render state used when the data grid is rendering the caption tag.
final public static int
RENDER_STATE_END The render state used when the data grid has completed rendering.
final public static int
RENDER_STATE_FOOTER The render state used when the data grid is rendering the footer.
final public static int
RENDER_STATE_GRID The render state used when the data grid is rendering the data rows.
final public static int
RENDER_STATE_HEADER The render state used when the data grid is rendering the header tag.
final public static int
RENDER_STATE_START The render state used when the data grid performs its first pass through its tag body.
Constructor used to build a DataGridTagModel.
Parameters: name - the name of the data grid Parameters: dataGridConfig - the DataGridConfig object for a data grid Parameters: jspContext - the JspContext for the JSP in which the data grid's rendering started
This method provides support for overriding the messages available in the
DataGridResourceProvider on a
per-message basis. The key and value parameters here will override (or add) a message available via
the
DataGridResourceProvider without requiring an entire Java properties file or custom
DataGridResourceProvider implementation.
Parameters: key - the key of the message to override Parameters: value - the new value for the message key
changeRenderState
public void changeRenderState(int renderState)(Code)
Method that alters the data grid's current render to the new renderState. If
the provided render state value is unknown, an
IllegalStateException is thrown. The
data grid cycles through its state in this order:
Format a message given a resource string name key and a set of
formatting arguments args.
Parameters: key - the message key Parameters: args - the arguments used when formatting the message the formatted message
Accessor for obtaining the current index in the data set. This value is a zero
based count current item being rendered. For the array {"foo", "bar", "baz"}, the
indices for each item would be 0, 1, and 2. This value does correspond to the
index into an Object array or a list, but in an arbitrary Collection, the index
is simply the number of items that appeared in the Collection before the current one.
the current index
Accessor for the
PagerRenderer . This is the
PagerRenderer instance that
will be used to render the UI used to display the pager.
the PagerRenderer for the data grid
Accessor for the current render state. This should be used by clients that need to
affect their behavior based on the data grid's current render state. This value will
be one of:
The value for the message is obtained by looking up a value in the
DataGridResourceProvider obtained
via
DataGridTagModel.getResourceProvider() using the message key in the table above.
Parameters: sortDirection - the SortDirection used to lookup an image path the string image used to represent a sort direction graphically
Accessor for obtaining the
DataGridState object. This is a JavaBean
property that can be accessed via an expression language in order to obtain
access to the state information for the data grid stored in the returned object.
the data grid's DataGridState
Accessor for obtaining the
DataGridURLBuilder object. This is a JavaBean
that can be accessed via an expression language in order to obtain access to the
URL information for the data grid stored in the returned object.
the data grid's DataGridURLBuilder
Accessor for determining if there is another item in the data set.
true if there is a next item; false otherwise.
isDisableDefaultPagerRendering
public boolean isDisableDefaultPagerRendering()(Code)
Check to see if the data grid will render its pager UI by default. The location for the default UI
is controlled by the JSP tag doing the rendering.
true if default rendering is enabled; false otherwise.
Get the flag for whether to render the data grid using HTML row groups. Row groups include the HTML
thead, tbody, and tfoot tags. If row group rendering is enabled,
the HTML produced by the data grid will be contained inside of these tags and rendered in the correct
order in the produced HTML. More detail on row groups can be found
here.
true if row groups will be rendered; false otherwise
Setter for the
PagedDataSet object. In order to canonicalize the type used by
the data grid to manipulate the data set, the
PagedDataSet is used to
navigate the data set.
Parameters: dataSet - the data set
setDisableDefaultPagerRendering
public void setDisableDefaultPagerRendering(boolean disableDefaultPagerRendering)(Code)
Set a boolean to enable or disable rendering the pager UI by default. If true, the
data grid rendering tags will produce the pager markup in some default location. If false
the default pager rendering will be disabled. The default location is determined by the tags
doing the rendering.
Parameters: disableDefaultPagerRendering - boolean for enabling or disabling rendering the pager in the default location
Set the
PagerRenderer used to render the paging UI for the data grid.
Parameters: pagerRenderer - the PagerRenderer to use
setRenderRowGroups
public void setRenderRowGroups(boolean renderRowGroups)(Code)
Set whether to render the data grid using HTML row groups. For more detail, see
DataGridTagModel.isRenderRowGroups() .
Parameters: renderRowGroups - true if rendering row groups; false otherwise