public abstract class PulldownList extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DatabaseProperties |
data
Object containing database connection properties.
|
| Constructor and Description |
|---|
PulldownList() |
| Modifier and Type | Method and Description |
|---|---|
protected ResultSet |
buildResultSet()
Creates result set that is used to generate select tag.
|
protected abstract ResultSet |
buildResultSet(String selector)
Creates result set that is used to generate select tag.
|
protected String |
getText(ResultSet rs,
String selector)
Determine text value for the option
|
protected String |
getValue(ResultSet rs,
String selector)
Determine the value for option
|
protected String |
initialOption()
Used to generate initial option in select tag.
|
String |
multipleRequest(String name)
Generate the HTML code for a SELECT tag that
allows multiple values to be selected.
|
String |
multipleRequest(String name,
String[] values)
Generate the HTML code for a SELECT tag that
allows multiple values to be selected.
|
String |
multipleRequest(String name,
String[] values,
String selector,
String attributes)
Generate the HTML code for a SELECT tag that
allows multiple values to be selected.
|
String |
singleRequest(String name)
Generate the HTML code for a SELECT tag
that allows a single value to be selected.
|
String |
singleRequest(String name,
String value)
Generate the HTML code for a SELECT tag
that allows a single value to be selected.
|
String |
singleRequest(String name,
String value,
String selector,
String attributes)
Generate the HTML code for a SELECT tag
that allows a single value to be selected.
|
protected DatabaseProperties data
The value should be set by the constructor.
public PulldownList()
protected abstract ResultSet buildResultSet(String selector)
selector - Option value that can be used to control generation of tagprotected String initialOption()
public String singleRequest(String name, String value, String selector, String attributes) throws SQLException
name - Name attribute for SELECT tagvalue - Existing value for selectorselector - Option to be used in creating HTML codeattributes - Code for additional attributes for SELECT tagSQLException - if database errorpublic String multipleRequest(String name, String[] values, String selector, String attributes) throws SQLException
name - Name attribute for SELECT tagvalues - Existing values for items in tagselector - Option to be used in creating HTML codeattributes - Additional attributes for SELECT tagSQLException - if database problemsprotected String getValue(ResultSet rs, String selector) throws SQLException
rs - Result set containing information for menuselector - Optional selector for controlling HTML generationSQLException - if database problemsprotected String getText(ResultSet rs, String selector) throws SQLException
rs - Result set containing informationselector - Optional selector for controlling HTML generationSQLException - if database problemsprotected ResultSet buildResultSet() throws SQLException
SQLException - if database problemspublic String singleRequest(String name) throws SQLException
name - Name attribute for SELECT tagSQLException - if database errorspublic String singleRequest(String name, String value) throws SQLException
name - Name attribute for SELECT tagvalue - Existing value for selectorSQLException - if database errorspublic String multipleRequest(String name) throws SQLException
name - Name attribute for SELECT tagSQLException - if database problemspublic String multipleRequest(String name, String[] values) throws SQLException
name - Name attribute for SELECT tagvalues - Existing values for items in tagSQLException - if database problemsCopyright © 2017. All rights reserved.