BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.databinding.grid
Class GridContext

java.lang.Object
  extended by com.bea.wlw.netui.tags.databinding.grid.GridContext

public final class GridContext
extends Object

A JavaBean that represents the runtime data of a specific Grid tag instance. This bean provides access to properties about a Grid tag without having to have a reference to the Grid tag itself. Upon initialization, the Grid will create a GridContext object that the GridComponent class will provide to its subclasses.

Information provided here includes the JavaBean that encapsulates the style data about a Grid and a DataContext object which exposes the data and metadata that a Grid will use to render.

A GridContext is both created and destroyed in a Grid tag's lifecycle. It is guaranteed to be dereferenced by the Grid in its AbstractBaseTag.release() JSP lifecycle method call.


Constructor Summary
GridContext()
          Create a GridContext object.
 
Method Summary
 boolean getAutoRender()
          Get the Grid's autoRender attribute, Grid.setAutoRender(boolean).
 DataContext getDataContext()
          Get the DataContext that contains the data the Grid will render
 String getDataSource()
          Get the dataSource attribute.
 GridStyleContext getGridStyle()
          Get a JavaBean that contains the style information for the grid.
 String getImageRoot()
           
 String getName()
          Get the name of the Grid.
 void setDataContext(DataContext dataContext)
          Set the DataContext object that the Grid uses to render data from a data set.
 void setDataSource(String dataSource)
          Set the dataSource attribute from the Grid tag.
 void setGridStyle(GridStyleContext gridStyleContext)
          Set a GridStyleContext JavaBean that contains style information for the grid.
 void setImageRoot(String imageRoot)
           
 void setName(String name)
          Set the name of the Grid using the Grid tag's Grid.setName(String) attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridContext

public GridContext()
Create a GridContext object. This initializes the DataContext to a basic, empty DataContext that provides basic data services to Grid tags. If an error occurs in creating a real DataContext that is specific to the dataset of the Grid, the empty DataContext may be used to render the grid in an empty state.

Method Detail

setImageRoot

public void setImageRoot(String imageRoot)

getImageRoot

public String getImageRoot()

setName

public void setName(String name)
Set the name of the Grid using the Grid tag's Grid.setName(String) attribute.

Parameters:
name - the Grid tag's name attribute

getName

public String getName()
Get the name of the Grid.

Returns:
the name of the Grid

getAutoRender

public boolean getAutoRender()
Get the Grid's autoRender attribute, Grid.setAutoRender(boolean).

Returns:
the autoRender attribute

setDataSource

public void setDataSource(String dataSource)
Set the dataSource attribute from the Grid tag. This attribute is an expression that references a dataset that should be rendered in the grid.

Parameters:
dataSource - the expression that references an Object which the grid will render.

getDataSource

public String getDataSource()
Get the dataSource attribute.

Returns:
the expression that references the data a Grid will render.

setDataContext

public void setDataContext(DataContext dataContext)
                    throws DataContextException
Set the DataContext object that the Grid uses to render data from a data set. It is illegal to try to set a null DataContext on a GridContext.

Parameters:
dataContext - the DataContext object to set.
Throws:
DataContextException - if the dataContext parameter is null
See Also:
DataContext

getDataContext

public DataContext getDataContext()
Get the DataContext that contains the data the Grid will render

Returns:
the DataContext object

setGridStyle

public void setGridStyle(GridStyleContext gridStyleContext)
Set a GridStyleContext JavaBean that contains style information for the grid.

Parameters:
gridStyleContext - the style information for the Grid

getGridStyle

public GridStyleContext getGridStyle()
Get a JavaBean that contains the style information for the grid.

Returns:
the style information for the Grid

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.