HAWHAW

PHP

Class HAW_select

HAW_select

public class HAW_select

This class provides a select element in a HAW_form object. It allows to create optimized WML for WAP devices which are capable to interprete the Openwave GUI extensions for WML 1.3. All other WAP devices receive WML 1.1 compatible markup code, which is quite similar to the markup code created by the HAW_radio class.

Examples:

$mySelect = new HAW_select("color");
$mySelect->add_option("Blue", "b");
$mySelect->add_option("Red", "r", HAW_SELECTED);
$mySelect->add_option("Yellow", "y");

See Also:
HAW_form

Constructor Summary
HAW_select(var $name, var $type)
          Constructor
 
Method Summary
 void add_option(var $label, var $value, var $is_selected)
          Adds one option to a HAW_select object.
 void set_voice_help(var $text, var $audio_src, var $url)
          Sets help text for voice browsers.
 void set_voice_noinput(var $text, var $audio_src, var $url)
          Sets noinput text for voice browsers.
 void set_voice_nomatch(var $text, var $audio_src, var $url)
          Sets nomatch text for voice browsers.
 void set_voice_text(var $text, var $audio_src)
          Sets text to be spoken by voice browsers.
 

Constructor Detail

HAW_select

public HAW_select(var $name,
                  var $type)
Constructor
Parameters:
name - Variable in which the information about the selected option is sent to the destination URL.
type - (optional)
Type of select area:
HAW_SELECT_POPUP: popup the whole selection list (default)
HAW_SELECT_SPIN: rotate options on a WAP device screen
Method Detail

add_option

public void add_option(var $label,
                       var $value,
                       var $is_selected)
Adds one option to a HAW_select object.
Parameters:
label - Describes the option on the surfer's screen/display.
value - Value (string!) sent in the "name" variable, if this option is selected.
is_selected - (optional)
Allowed values are HAW_SELECTED or HAW_NOTSELECTED (default).
Note: Setting to "selected" will overwrite previous "selected" options of this HAW_select object.

set_voice_text

public void set_voice_text(var $text,
                           var $audio_src)
Sets text to be spoken by voice browsers.
Parameters:
text - Some alternative text that replaces the enumeration of select options.
audio_src - Some audio file (e.g. *.wav file) to play (optional).

set_voice_help

public void set_voice_help(var $text,
                           var $audio_src,
                           var $url)
Sets help text for voice browsers.
Parameters:
text - Some helpful information concerning this select element.
audio_src - Some audio file (e.g. *.wav file) to play (optional).
url - Some other voice deck to go to (optional).

set_voice_noinput

public void set_voice_noinput(var $text,
                              var $audio_src,
                              var $url)
Sets noinput text for voice browsers.
Parameters:
text - Some text to inform the user that no input has been received.
audio_src - Some audio file (e.g. *.wav file) to play (optional).
url - Some other voice deck to go to (optional).

set_voice_nomatch

public void set_voice_nomatch(var $text,
                              var $audio_src,
                              var $url)
Sets nomatch text for voice browsers.
Parameters:
text - Some text to complain that user input was not recognized.
audio_src - Some audio file (e.g. *.wav file) to play (optional).
url - Some other voice deck to go to (optional).

© Norbert Huffschmid
assembled from PHP source
using sed and javadoc