The Front End Protocol is a set of instructions sent by the User Agent to the Genero Application Server.
User Agents send form data to form data processing agents as a sequence of control-name and control-value. For example, the browser sends pairs of name=value to the Genero Application Server. Most controls have names but the value submitted is not always the one expected. Inclusive form is introduced to workaround the default behaviour.
Syntax
Exclusive form
control-name=control-value
that is
<prefix> [ container ] = [ [ ss/prefix ] <value> ]
Inclusive form
control-name/control-value=
that is
<prefix> [ container ] [ / [ ss/prefix ] <value> ] =
Where
To build the control-name use the template paths IDID
(inclusive
form) or XDID
(exclusive form).
Facilities are available as functions in the
Front End Protocol
Functions section.
Example
Exclusive form
<input type="radio" gwc:attributes="name XDID; value ID;...
/>
produces
<input type="radio" name="a" value="89"... />
Inclusive form
<input type="submit" gwc:attributes="name IDID"... />
produces
<input type="submit" name="a/89"... />
The Front End Protocol is used to enhance user agents that have "poor" interactivity like Personal Digital Assistants.
Example of a ComboBox value selection helper
A ComboBox (<select> html widget) is redesigned as a set of buttons (input of type
submit). The Select widget is submitted in exclusive form. The Button has a name
but the value represents the displayed text of the button and not the value
expected from a ComboBox.
<p gwc:omit-tag="true" gwc:repeat="cb_item items">
<input type="submit" gwc:attributes="disabled isModifiable?NULL:'disabled';
name makeValueIDID(id,cb_item/name); value cb_item/text"/>
</p>
Add this sample in the $FGLASDIR/set2/ComboBox.xhtml. Instead of selecting the ComboBox value, click on the button to select a value in the ComboBox list.