12.07.2015 Views

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Zen</strong> TablesIf a or is placed within a composite element, the corresponding mustbe placed within the same composite element.1.10.2 Navigation KeysThe can specify event handling for user key clicks as follows.PropertyonkeypressDescriptionIf useKeys is true, this client-side JavaScript expression runs whenever the user pressesa key (Up, Down, Page Up, Page Down, Home, End) while focus is in the table.When providing a value for this attribute, use double quotes to enclose the value andsingle quotes (if needed) within the JavaScript expression. For example:The JavaScript expression may contain <strong>Zen</strong> #()# runtime expressions.useKeysIf true, this tablePane captures user keystrokes (Up, Down, Page Up, Page Down, Home,End) and uses them for simple table navigation. The default is false.This attribute has the underlying data type %ZEN.Datatype.boolean. It has the value "true"or "false" in XData Contents, 1 or 0 in server-side code, true or false in client-side code.1.10.3 Sorting TablesThe must use snapshot mode to allow users to sort table columns. If you want the user to be able to sort tablecolumns by clicking on their headers, you must set the useSnapshot attribute to true; by default, useSnapshotis false. For details and important limitations, see the “Snapshot Mode” section.When useSnapshot is true, you can selectively disable sorting for a column by setting the disableSort attributeto true. For more about column attributes like disableSort see the “Table Columns” section.When snapshots are enabled, the user can sort the table according to a particular column simply by clicking on a columnheader: First click, ascending order; second click, descending order; third click, unsorted; and so on. You can set an initialvalue for sortOrder when you add the to the page, as described in the following table. However, sortOrderusually takes its value based on user actions (clicking column headers in the table).PropertysortOrderDescriptionWhen the user clicks on a column header, <strong>Zen</strong> sorts the table based on the values in that columnand the order specified by the sortOrder value. sortOrder toggles between its possible values"asc" (sort in ascending order) and "desc" (sort in descending order) each time the user clicksin that column header.sortOrder does not affect the query itself (it does not interact with the query ORDER BY setting).sortOrder simply controls the order in which the table displays the resultset returned by thequery.The sortOrder value can be a literal string, or it can contain a <strong>Zen</strong> #()# runtime expression.26 <strong>Using</strong> <strong>Zen</strong> <strong>Components</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!