Xataface 2.0
Xataface Application Framework
Public Member Functions
dataface_actions_RecordBrowser_data Class Reference

Public Member Functions

 handle (&$params)

Detailed Description

Handler for the RecordBrowser_data. This action will display a series of HTML <OPTION> tags that are intended to be loaded by the RecordBrowser jquery component into a SELECT list dynamically. This takes the standard Xataface query parameters to dictate which records get returned. The output will look something like:

<option value="1">Steve Hannah</option> <option value="2">Joe Smith</option> ... etc...

The option values are the ID of the record. If the table requested has only a single column in its primary key, then this will contain only that value. Otherwise it will contain a Xataface record id. The text is the title of the record.

Parameters:
$_GET['-value']The name of the field to be used as the value in the <option> tag. : -value=<fieldname> Indicates that we should use the field named <fieldname> as the value. : -value=__id__ Indicates that we should use the xataface record id. : If this parameter is omitted it will either use the primary key field, if the primary key is only a single column. If the primary key contains more than one column, then the xataface record id is used.
$_GET['-text']The name of the field to be used as the text of the <option> tag. : -text=<fieldname> Indicates that we should use the field named <fieldname> as the text. : -text=__title__ Indicates that we shoudl use the record title. : If this parameter is omitted it will simply use the record title.
Returns:
The title of the record.

Example usage:

index.php?-action=RecordBrowser_data&-table=people index.php?-action=RecordBrowser_data&-table=people&-search=Hannah

This was created specifically to be used by the RecordBrowser jquery component that is part of the lookup widget.

Related files: Dataface/FormTool/lookup.php HTML/QuickForm/lookup.php js/RecordBrowser

July 15, 2009

Author:
Steve Hannah <shannah@sfu.ca>

Definition at line 68 of file RecordBrowser_data.php.


Member Function Documentation

handle ( &$  params)

Definition at line 69 of file RecordBrowser_data.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations