| java.lang.Object com.salmonllc.html.HtmlComponent com.salmonllc.html.HtmlFormComponent com.salmonllc.html.HtmlDropDownList
HtmlDropDownList | public class HtmlDropDownList extends HtmlFormComponent implements PageListener(Code) | | This class is used for text input in a page in the form of a drop down list box of options.
|
Constructor Summary | |
public | HtmlDropDownList(String name, com.salmonllc.html.HtmlPage p) Constructs a new HTMLDropDownList component. | public | HtmlDropDownList(String name, String theme, com.salmonllc.html.HtmlPage p) Constructs a new HTMLDropDownList component. | public | HtmlDropDownList(String name, String theme, HtmlPage page, String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion) Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. | public | HtmlDropDownList(String name, String theme, HtmlPage page, String table, String keyColumn, String dispColumn, boolean inputVersion) Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. |
Method Summary | |
public void | addOption(String key, String disp) Use this method to add new choices to the list. | public void | addOption(HtmlOption opt) Use this method to add new choices to the list. | public int | findOption2IndexOf(String key) This method returns the index of the option with the specified key. | public int | findOptionIndexOf(String key) This method returns the index of the option with the specified key. | public void | generateHTML(java.io.PrintWriter p, int rowNo) | public String | getCriteria() | public String | getFontEndTag() This method gets the end font tag for the component. | public String | getFontStartTag() This method gets the start font tag for the component. | public String | getOnChange() This method gets the javascript to be executed when the value of the text in the component changes. | public String | getOnClick() This method gets the javascript to be executed when the component is clicked on. | public String | getOnFocus() This method gets the javascript to be executed when the component gets focus. | public String | getOnLoseFocus() This method gets the javascript to be executed when the component loses focus. | public int | getOptionCount() This method returns the number of options in the component. | public String | getOptionKey(int index) Use this method get the value of the key at index. | public String | getOptionValue(int index) Use this method get the value of the option at index. | public OptionsSort | getOptionsVector() | public boolean | getReloadDropDownInEveryPageRequest() | public int | getSelectedIndex() Returns the index of the selected option. | public int | getSelectedIndex(int rowNo) Returns the index of the selected option. | public String | getStyle() This method gets the property style (allows for the inlining of style attributes like color:#666666;) for the component. | public int | getTabIndex() | public void | initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion) | public void | initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion, boolean trimResults) | public void | initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion, boolean trimResults, boolean toUpper) | public void | initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion, boolean trimResults, boolean toUpper, boolean reloadOptionsEveryPageRequest) Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. A simplifying assumption is that each of the following is the same: - name of column in the main table which refers to the simple table - name of integer column in simple table
Parameters: table - - name of table to look up keys and displays from Parameters: keyColumn - - column to get key values from Parameters: dispColumn - - column to get display values from Parameters: criteria - - optional selection criteria Parameters: inputVersion - - optional value that allows for a null to be placed at the top Parameters: trimResults - - optional value that trims the rtesults before adding the options Parameters: toUpper - - optional value that makes the option's kays and display values all upper case Parameters: reloadOptionsEveryPageRequest - - If this is set and the options are bound to the database, than options will be refereshed in every page request. | public boolean | isInputVersion() | public boolean | isToUpper() | public boolean | isTrimResults() | public void | pageRequestEnd(PageEvent p) | public void | pageRequested(PageEvent p) This method refreshes the dropdown if the attribute is set. | public void | pageSubmitEnd(PageEvent p) | public void | pageSubmitted(PageEvent p) | public void | populateDropdownOptions() | public boolean | processParms(Hashtable parms, int rowNo) | public void | removeOption(int index) Use this method to remove an option from the list. | public void | removeOption(String optionText) | public void | resetOptions() This method removes all options from the component. | public void | setCriteria(String criteria) | public void | setFontEndTag(String value) This method sets the end font tag for the component. | public void | setFontStartTag(String value) This method sets the start font tag for the component. | public void | setInputVersion(boolean _inputVersion) | public void | setOnChange(String value) This method sets the javascript to be executed when the value of the text in the component changes. | public void | setOnClick(String value) This method sets the javascript to be executed when the component is clicked on. | public void | setOnFocus(String value) This method sets the javascript to be executed when the component gains focus. | public void | setOnLoseFocus(String value) This method sets the javascript to be executed when the component loses focus. | public void | setOptionKey(int index, String key) Use this method to set the key of the option at index. | public void | setOptionValue(int index, String value) Use this method to set the value of the option at index. | public void | setOptions(ArrayList options) This method adds the options in the list. | public void | setSelectedIndex(int index) Sets the value of the selected index. | public void | setSelectedIndex(int index, int row) Sets the value of the selected index. | public void | setStyle(String style) This method sets the property style (allows for the inlining of style attributes like color:#666666;) for the component. | public void | setTabIndex(int val) sets the tab index html attribute. | public void | setTheme(String theme) This method sets the property theme for the component. | public void | setToUpper(boolean toUpper) | public void | setTrimResults(boolean trimResults) | public void | set_reloadDropDownInEveryPageRequest(boolean reloadDropDownInEveryPageRequest) | public void | sort() Claudio Pi (4-01-2003) This method sorts the dropdown list based on its options values in the default order direction. | public void | sort(int dir) Claudio Pi (4-01-2003) This method sorts the dropdown list based on its options values in the given order direction. |
HtmlDropDownList | public HtmlDropDownList(String name, com.salmonllc.html.HtmlPage p)(Code) | | Constructs a new HTMLDropDownList component.
Parameters: name - The name of the component Parameters: p - The page the component will be placed in. |
HtmlDropDownList | public HtmlDropDownList(String name, String theme, com.salmonllc.html.HtmlPage p)(Code) | | Constructs a new HTMLDropDownList component.
Parameters: name - The name of the component Parameters: theme - The theme to use for loading properties. Parameters: p - The page the component will be placed in. |
HtmlDropDownList | public HtmlDropDownList(String name, String theme, HtmlPage page, String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion)(Code) | | Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. A simplifying assumption is that each of the following is the same: - name of column in the main table which refers to the simple table - name of integer column in simple table
Parameters: name - DOCUMENT ME! Parameters: theme - DOCUMENT ME! Parameters: page - com.salmonllc.html.HtmlPage The page hold the new component Parameters: table - - name of table to look up keys and displays from Parameters: keyColumn - - column to get key values from Parameters: dispColumn - - column to get display values from Parameters: criteria - - optional selection criteria Parameters: inputVersion - - optional value that allows for a null to be placed at the top |
HtmlDropDownList | public HtmlDropDownList(String name, String theme, HtmlPage page, String table, String keyColumn, String dispColumn, boolean inputVersion)(Code) | | Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. A simplifying assumption is that each of the following is the same: - name of column in the main table which refers to the simple table - name of integer column in simple table
Parameters: name - DOCUMENT ME! Parameters: theme - DOCUMENT ME! Parameters: page - com.salmonllc.html.HtmlPage The page hold the new component Parameters: table - - name of table to look up keys and displays from Parameters: keyColumn - - column to get key values from Parameters: dispColumn - - column to get display values from Parameters: inputVersion - - optional value that allows for a null to be placed at the top |
addOption | public void addOption(String key, String disp)(Code) | | Use this method to add new choices to the list.
Parameters: key - The internal name of the item (must be unique) Parameters: disp - The value to be displayed on the list. |
addOption | public void addOption(HtmlOption opt)(Code) | | Use this method to add new choices to the list.
Parameters: opt - - This allows for full control of the option before adding |
findOption2IndexOf | public int findOption2IndexOf(String key)(Code) | | This method returns the index of the option with the specified key.
Parameters: key - DOCUMENT ME! The index of the key or -1 if not found. |
findOptionIndexOf | public int findOptionIndexOf(String key)(Code) | | This method returns the index of the option with the specified key.
Parameters: key - DOCUMENT ME! The index of the key or -1 if not found. |
getCriteria | public String getCriteria()(Code) | | Returns the criteria
|
getFontEndTag | public String getFontEndTag()(Code) | | This method gets the end font tag for the component.
DOCUMENT ME! |
getFontStartTag | public String getFontStartTag()(Code) | | This method gets the start font tag for the component.
DOCUMENT ME! |
getOnChange | public String getOnChange()(Code) | | This method gets the javascript to be executed when the value of the text in the component changes.
DOCUMENT ME! |
getOnClick | public String getOnClick()(Code) | | This method gets the javascript to be executed when the component is clicked on.
DOCUMENT ME! |
getOnFocus | public String getOnFocus()(Code) | | This method gets the javascript to be executed when the component gets focus.
DOCUMENT ME! |
getOnLoseFocus | public String getOnLoseFocus()(Code) | | This method gets the javascript to be executed when the component loses focus.
DOCUMENT ME! |
getOptionCount | public int getOptionCount()(Code) | | This method returns the number of options in the component.
DOCUMENT ME! |
getOptionKey | public String getOptionKey(int index)(Code) | | Use this method get the value of the key at index.
Parameters: index - DOCUMENT ME! DOCUMENT ME! |
getOptionValue | public String getOptionValue(int index)(Code) | | Use this method get the value of the option at index.
Parameters: index - DOCUMENT ME! DOCUMENT ME! |
getReloadDropDownInEveryPageRequest | public boolean getReloadDropDownInEveryPageRequest()(Code) | | This methods returns the ReloadDropDownInEveryPageRequest attribute
|
getSelectedIndex | public int getSelectedIndex()(Code) | | Returns the index of the selected option.
DOCUMENT ME! |
getSelectedIndex | public int getSelectedIndex(int rowNo)(Code) | | Returns the index of the selected option.
Parameters: rowNo - DOCUMENT ME! DOCUMENT ME! |
getStyle | public String getStyle()(Code) | | This method gets the property style (allows for the inlining of style attributes like color:#666666;) for the component.
DOCUMENT ME! |
getTabIndex | public int getTabIndex()(Code) | | Returns the tab index html attribute
int |
initialize | public void initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion)(Code) | | Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. A simplifying assumption is that each of the following is the same: - name of column in the main table which refers to the simple table - name of integer column in simple table
Parameters: table - - name of table to look up keys and displays from Parameters: keyColumn - - column to get key values from Parameters: dispColumn - - column to get display values from Parameters: criteria - - optional selection criteria Parameters: inputVersion - - optional value that allows for a null to be placed at the top |
initialize | public void initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion, boolean trimResults)(Code) | | Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. A simplifying assumption is that each of the following is the same: - name of column in the main table which refers to the simple table - name of integer column in simple table
Parameters: table - - name of table to look up keys and displays from Parameters: keyColumn - - column to get key values from Parameters: dispColumn - - column to get display values from Parameters: criteria - - optional selection criteria Parameters: inputVersion - - optional value that allows for a null to be placed at the top Parameters: trimResults - - optional value that trims the rtesults before adding the options |
initialize | public void initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion, boolean trimResults, boolean toUpper)(Code) | | Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. A simplifying assumption is that each of the following is the same: - name of column in the main table which refers to the simple table - name of integer column in simple table
Parameters: table - - name of table to look up keys and displays from Parameters: keyColumn - - column to get key values from Parameters: dispColumn - - column to get display values from Parameters: criteria - - optional selection criteria Parameters: inputVersion - - optional value that allows for a null to be placed at the top Parameters: trimResults - - optional value that trims the rtesults before adding the options Parameters: toUpper - - optional value that makes the option's kays and display values all upper case |
initialize | public void initialize(String table, String keyColumn, String dispColumn, String criteria, boolean inputVersion, boolean trimResults, boolean toUpper, boolean reloadOptionsEveryPageRequest)(Code) | | Creates a drop-down list based on a table with an integer primary key column (typically an id) and a string column. A simplifying assumption is that each of the following is the same: - name of column in the main table which refers to the simple table - name of integer column in simple table
Parameters: table - - name of table to look up keys and displays from Parameters: keyColumn - - column to get key values from Parameters: dispColumn - - column to get display values from Parameters: criteria - - optional selection criteria Parameters: inputVersion - - optional value that allows for a null to be placed at the top Parameters: trimResults - - optional value that trims the rtesults before adding the options Parameters: toUpper - - optional value that makes the option's kays and display values all upper case Parameters: reloadOptionsEveryPageRequest - - If this is set and the options are bound to the database, than options will be refereshed in every page request. This will increase trhe database trafic. |
isInputVersion | public boolean isInputVersion()(Code) | | |
isToUpper | public boolean isToUpper()(Code) | | Flag to convert the options to the upper case
|
isTrimResults | public boolean isTrimResults()(Code) | | Flag to trim the options
|
pageRequested | public void pageRequested(PageEvent p) throws Exception(Code) | | This method refreshes the dropdown if the attribute is set.
Parameters: p - throws: Exception - |
populateDropdownOptions | public void populateDropdownOptions()(Code) | | This method populates the dropdown list options
|
removeOption | public void removeOption(int index)(Code) | | Use this method to remove an option from the list.
Parameters: index - The index of the option to remove. |
removeOption | public void removeOption(String optionText)(Code) | | |
resetOptions | public void resetOptions()(Code) | | This method removes all options from the component.
|
setCriteria | public void setCriteria(String criteria)(Code) | | Sets the criteria
Parameters: criteria - |
setFontEndTag | public void setFontEndTag(String value)(Code) | | This method sets the end font tag for the component.
Parameters: value - DOCUMENT ME! |
setFontStartTag | public void setFontStartTag(String value)(Code) | | This method sets the start font tag for the component.
Parameters: value - DOCUMENT ME! |
setInputVersion | public void setInputVersion(boolean _inputVersion)(Code) | | |
setOnChange | public void setOnChange(String value)(Code) | | This method sets the javascript to be executed when the value of the text in the component changes.
Parameters: value - DOCUMENT ME! |
setOnClick | public void setOnClick(String value)(Code) | | This method sets the javascript to be executed when the component is clicked on.
Parameters: value - DOCUMENT ME! |
setOnFocus | public void setOnFocus(String value)(Code) | | This method sets the javascript to be executed when the component gains focus.
Parameters: value - DOCUMENT ME! |
setOnLoseFocus | public void setOnLoseFocus(String value)(Code) | | This method sets the javascript to be executed when the component loses focus.
Parameters: value - DOCUMENT ME! |
setOptionKey | public void setOptionKey(int index, String key)(Code) | | Use this method to set the key of the option at index.
Parameters: index - DOCUMENT ME! Parameters: key - DOCUMENT ME! |
setOptionValue | public void setOptionValue(int index, String value)(Code) | | Use this method to set the value of the option at index.
Parameters: index - DOCUMENT ME! Parameters: value - DOCUMENT ME! |
setOptions | public void setOptions(ArrayList options)(Code) | | This method adds the options in the list. This method can be used in a property expression. To use this in a property expression ; 1- Create a DataStoreExpression class which will extend DataStoreExpression. in the evaluateExpression() method handle the row value and create a list of HtmlOption objects and return all of them in a ArrayList. 2- In the controller add the property expression
to the datatable. Example; MyDSExpressionThatExtendsDataStoreExpression dsSourceExp = new MyDSExpressionThatExtendsDataStoreExpression(); _myDataTable.addPropertyExpression(_ddlMyDropDownList, "Options", dsSourceExp); //TODO Add some examples for this method.
Parameters: options - |
setSelectedIndex | public void setSelectedIndex(int index)(Code) | | Sets the value of the selected index.
Parameters: index - DOCUMENT ME! |
setSelectedIndex | public void setSelectedIndex(int index, int row)(Code) | | Sets the value of the selected index.
Parameters: index - DOCUMENT ME! Parameters: row - DOCUMENT ME! |
setStyle | public void setStyle(String style)(Code) | | This method sets the property style (allows for the inlining of style attributes like color:#666666;) for the component.
Parameters: style - - The style text to use. |
setTabIndex | public void setTabIndex(int val)(Code) | | sets the tab index html attribute. You can also pass TAB_INDEX_DEFAULT to use the default tab index for the component or TAB_INDEX_NONE to keep this component from being tabbed to
Parameters: val - |
setTheme | public void setTheme(String theme)(Code) | | This method sets the property theme for the component.
Parameters: theme - The theme to use. |
setToUpper | public void setToUpper(boolean toUpper)(Code) | | Flag to convert the options to the upper case
Parameters: toUpper - |
setTrimResults | public void setTrimResults(boolean trimResults)(Code) | | Flag to trim the options
Parameters: trimResults - |
set_reloadDropDownInEveryPageRequest | public void set_reloadDropDownInEveryPageRequest(boolean reloadDropDownInEveryPageRequest)(Code) | | This method sets the ReloadDropDownInEveryPageRequest attribute
Parameters: reloadDropDownInEveryPageRequest - |
sort | public void sort()(Code) | | Claudio Pi (4-01-2003) This method sorts the dropdown list based on its options values in the default order direction.
|
sort | public void sort(int dir)(Code) | | Claudio Pi (4-01-2003) This method sorts the dropdown list based on its options values in the given order direction.
Parameters: dir - direction in which the options will be sorted (0=Ascending or 1=Descending order) |
Methods inherited from com.salmonllc.html.HtmlFormComponent | protected void addEvent(ValueChangedEvent e)(Code)(Java Doc) public void addValueChangedListener(ValueChangedListener l)(Code)(Java Doc) protected void convertValue()(Code)(Java Doc) public boolean executeEvent(int eventType) throws Exception(Code)(Java Doc) protected int findEvent(int rowNo)(Code)(Java Doc) protected void generateAutoTabJavaScript(PrintWriter pw)(Code)(Java Doc) abstract public void generateHTML(java.io.PrintWriter p, int row) throws Exception(Code)(Java Doc) public DataStoreBuffer getBoundDataStore()(Code)(Java Doc) public int getColumnNumber()(Code)(Java Doc) protected String getDataStoreValue(int rowNo)(Code)(Java Doc) public String getDisabledFontEndTag()(Code)(Java Doc) public String getDisabledFontStartTag()(Code)(Java Doc) public String getDisplayFormat()(Code)(Java Doc) public String getDisplayFormatLocaleKey()(Code)(Java Doc) public boolean getEnabled()(Code)(Java Doc) protected ValueChangedEvent getEventAt(int index)(Code)(Java Doc) protected int getEventCount()(Code)(Java Doc) public String getJavaScriptName()(Code)(Java Doc) public String getTheme()(Code)(Java Doc) public String getValue()(Code)(Java Doc) public String getValue(int rowNo)(Code)(Java Doc) protected String getValue(int rowNo, boolean remove)(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isValid()(Code)(Java Doc) protected void processLocaleInfo()(Code)(Java Doc) protected void removeEvent(int index)(Code)(Java Doc) public void removeValueChangedListener(ValueChangedListener l)(Code)(Java Doc) public void reset()(Code)(Java Doc) public void setColumn(DataStoreBuffer ds, int columnNo)(Code)(Java Doc) public void setColumn(DataStoreBuffer ds, String columnName)(Code)(Java Doc) public void setDisabledFontEndTag(String tag)(Code)(Java Doc) public void setDisabledFontStartTag(String tag)(Code)(Java Doc) public void setDisplayFormat(String format)(Code)(Java Doc) public void setDisplayFormatLocaleKey(String formatLocaleKey)(Code)(Java Doc) public void setEnabled(boolean enabled)(Code)(Java Doc) public void setEnabled(boolean enabled, boolean useDisableAttribute)(Code)(Java Doc) public void setFocus()(Code)(Java Doc) public void setFocus(boolean select)(Code)(Java Doc) public void setFocus(int row, boolean select)(Code)(Java Doc) public void setFocus(int row)(Code)(Java Doc) public void setForceCase(int mode)(Code)(Java Doc) protected boolean setTempValue(String value, int rowNo, int eventNo)(Code)(Java Doc) public void setTheme(String theme)(Code)(Java Doc) public void setValue(String value)(Code)(Java Doc) public void setValue(String value, int rowNo)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void updateLocale()(Code)(Java Doc) protected boolean valuesEqual(Object newValue, Object oldValue)(Code)(Java Doc) protected void writeFocusScript(java.io.PrintWriter p, int row)(Code)(Java Doc)
|
|
|