TWiki> WebXEO Web>XeoXwc>GridPanel (revision 2)EditAttach
Tags:
create new tag
, view all tags
-- PedroRio - 20 Apr 2010

GridPanel

A GridPanel is a XVW component that's used to display (in a tabular form) a list of items (provided by a data source). It provides built-in mechanisms to sort, group the data and other.

Items in the table can be selected and clicked which can in turn trigger specific actions (such as opening a new window when double clicking a given row in the table)

A GridPanel should be used inside a Panel component.

XML Definition

A GridPanel is declared as following:

<xvw:gridPanel 
 datasource="#{viewBean.dataSource}"
 ...
 otherAttributes
 ...
>
</xvw:gridPanel>

GridPanel Properties

Property Description Requirement Default Value Type Example
dataSource The list of items for the GridPanel required - netgest.bo.xwc.components.connectors.DataListConnector This property must be binded to the Bean and must return an implementation of the DataList connector. There are aready two default implementations. The XEOObjectListConnector and the XEOBridgeListConnector.
           
           

Possible Child Components:

  • ColumnAttribute (to choose which columns should appear in the table)
  • GridNavBar (to choose if a given number of options should be present in the navigational bar of the GridPanel)
  • ToolBar (Each GridPanel has a default toolbar wich can be overriden)

Property DataSource:

XEOObjectListConnector: The XEOObjectListConnector receives a boObjectList as an argument of the contructor and can be used to incorporate any list of boObjects in the GridPanel

XEOBridgeListConnector: The XEOBridgeListConnector receives a bridgeHandler as an argument of the constructor and can be used to display a bridge of objects in the GridPanel.

Example: Imagine that we want to display all instances of the system model "Ebo_Perf" in a given GridPanel, the dataSource property of the Bean could be a method like this:

public DataListConnector getDataSource()
{
      String boql = 'select Ebo_Perf';
      boObjectList listOfUsers = boObjectList.list(getEboContext(), boql);
      return new XEOObjectListConnector(listOfUsers);
}

To Continue:

Edit | Attach | Print version | History: r23 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2010-05-16 - PedroRio
 

No permission to view TWiki.WebTopBar

This site is powered by the TWiki collaboration platform Powered by Perl

No permission to view TWiki.WebBottomBar