widget:tbody

Purpose

Defines body of the AJAX Table widget.

Contains

Contained by

Attribute groups

Attribute

Attribute Description Type Default Options Use
cached-pages-count Specifies the number of cached pages. By default nothing is cached. xs:integer   optional 

Actions

Action Description
first-page Displays the first page of a table, unless table is displaying the first page
last-page Displays the last page of a table, unless table is displaying the last page
next-page Displays the next page of a table, unless table is displaying the last page
next-row Displays the next row of a table, unless table is displaying the last row
previous-page Displays the previous page of a table, unless table is displaying the first page
previous-row Displays the previous row of a table, unless table is displaying the first row

Properties

Property Description Type Access
end-row-number A number of the last row being displayed in the table xs:integer read/write 
load Identifies the widget:load element used to load the content of the table xs:string read 
load-error-message Contains an error message if the last load action failed, or empty string if it was successful xs:string read 
rows-count Total number of rows in the table xs:integer read 
start-row-number A number of the first row being displayed in the table xs:integer read/write 

Example

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:widget="http://www.volantis.com/xmlns/2006/05/widget">
  <head>
    <title>widget:tbody</title>
  </head>
  <body>
    <widget:table>
      <thead>
        <tr>
          <th>Code</th>
          <th>Country name</th>
        </tr>
      </thead>
      <widget:tbody id="tbody" style="mcs-table-rows-per-page:10; color: #fff;">
        <widget:load src="http://localhost:8080/mcs/projects/client-app/service/table" when="onload"/>
        <tr style="background-color:#fff">
          <td>--</td>
          <td>Loading, please wait...</td>
        </tr>
      </widget:tbody>
    </widget:table>
    <div>
      <widget:button action="tbody#first-page">&lt;&lt;&lt;</widget:button>
      <widget:button action="tbody#previous-page">&lt;&lt;</widget:button>
      <widget:button action="tbody#previous-row">&lt;</widget:button> From <widget:display
        property="tbody#start-row-number"/> to <widget:display property="tbody#end-row-number"/> of
      <widget:display property="tbody#rows-count"/>
      <widget:button action="tbody#next-row">&gt;</widget:button>
      <widget:button action="tbody#next-page">&gt;&gt;</widget:button>
      <widget:button action="tbody#last-page">&gt;&gt;&gt;</widget:button>
    </div>
  </body>
</html>

Related topics