|
|
|
|
The object choosers are GUI elements for selecting object identifiers into form variables. All the objects of a class implementing the HammerkitObject interface have a chooser. The choosers are added to the GUI by calling the chooser function of the object. Below are listed all the choosers and their funcions. The functions return the HTML code for the chooser element. The chooser functions have the following format:
string objectChooser(string name [, string value [, array specials [, array settings [, array options]]]])
All the chooser functions have the same arguments:
- name: the name of the form element to give the value to
- value: a preset value for the chooser, an object id or identifier
- specials: an array containing the special types that are supported, default value is an empty string "", which makes the chooser give a list of default specials
- settings: an array of additional settings where the array key is the name of the setting and the array value is the value of the setting
- options: an array containing object chooser specific boolean configuration options, all options are FALSE by default
NOTE! Every class implementing the HammerkitObject interface has a method getChooser, that is an alias to the chooser function below that corresponds to the class.
Button Chooser
Function name: buttonChooser
Settings:
- onchang_function: a Javascript function to call when the chooser value changes
- style: CSS style properties for the chooser select box
Options: none
Color Chooser
Function name: colorChooser
Settings:
- onchang_function: a Javascript function to call when the chooser value changes
Options:
- NO_PREDEFINED: no predefined colors are listed in the chooser
Component Chooser
Function name: componentChooser
Settings:
- onchang_function: a Javascript function to call when the chooser value changes
- style_input: CSS style properties for the text input element of the chooser
- style_button: CSS style properties for the browse button of the chooser
- opener_button: the Button object to use as the opener button of the chooser
Options:
- BLOCK_THIS: prevents thisComponent from beeing chosen
- OPENER_BUTTON_ONLY: show only the opener button of the chooser
- RELOAD_OPENER: reload the opener window when the chooser closes
File Chooser
Function name: fileChooser
Settings:
- onchang_function: a Javascript function to call when the chooser value changes
- style_input: CSS style properties for the text input element of the chooser
- style_button: CSS style properties for the browse button of the chooser
- opener_button: the Button object to use as the opener button of the chooser
Options:
- DIRS_ONLY: only directories can be chosen
- FILES_ONLY: only files can be chosen
- OPENER_BUTTON_ONLY: show only the opener button of the chooser
- RELOAD_OPENER: reload the opener window when the chooser closes
Keyword Chooser
Function name: keywordChooser
Settings:
- onchang_function: a Javascript function to call when the chooser value changes
- style_input: CSS style properties for the text input element of the chooser
- style_button: CSS style properties for the browse button of the chooser
Options: none
Style Chooser
Function name: styleChooser
Settings:
- onchang_function: a Javascript function to call when the chooser value changes
- style: CSS style properties for the chooser select box
Options:
- RETURN_CLASS_NAME: the values of the select box get the class name of the style instead of the database id of the style
User Chooser
Function name: userChooser
Settings:
- onchang_function: a Javascript function to call when the chooser value changes
- style_input: CSS style properties for the text input element of the chooser
- style_button: CSS style properties for the browse button of the chooser
Options:
- GROUPS_ONLY: only user groups can be chosen
- USERS_ONLY: only users can be chosen
- RELOAD_OPENER: reload the opener window when the chooser closes
|
� HammerKit Oy 2008 |
UPDATED: 03.04.2007 10:45 |
|