com.arsdigita.acs.html
Class HtmlWidgets
java.lang.Object
|
+--com.arsdigita.acs.html.HtmlWidgets
- public final class HtmlWidgets
- extends java.lang.Object
Class for HTML-generating widgets.
|
Field Summary |
static java.lang.String |
cvsId
|
|
Method Summary |
static java.lang.String |
columnTypeWidget(java.lang.String name)
|
static java.lang.String |
dateWidget(java.lang.String fieldName)
|
static java.lang.String |
dateWidget(java.lang.String fieldName,
java.util.Date d)
|
static java.lang.String[] |
dayList()
|
static java.lang.String |
fieldFormElement(java.lang.String field_name,
java.lang.String column_type,
java.lang.String default_value)
Creates a HTML form fragment of a type appropriate for the type of
data expected (eg radio buttons if the type is boolean). |
static java.lang.String |
htmlOptions(MultiDataSource ds,
java.lang.String selected)
Assumes that in the given DataSource, the first column should
be used as the option text, and the second column should be
used as the option value. |
static java.lang.String |
htmlOptions(java.lang.String[][] objects,
java.lang.String selected)
Returns a list of HTML option tags from an array of arrays of String pairs. |
static java.lang.String |
htmlOptions(java.lang.String[] values,
java.lang.String[] text,
java.lang.String selected)
Returns a list of HTML option tags. |
static java.lang.String |
htmlOptions(java.util.Vector vals,
java.util.Vector text,
java.lang.String selected)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cvsId
public static final java.lang.String cvsId
HtmlWidgets
public HtmlWidgets()
htmlOptions
public static final java.lang.String htmlOptions(java.lang.String[] values,
java.lang.String[] text,
java.lang.String selected)
- Returns a list of HTML option tags.
values
is the list of option values, text is the
text to display after each option tag, and selected
is the default (selected) option.
htmlOptions
public static final java.lang.String htmlOptions(java.util.Vector vals,
java.util.Vector text,
java.lang.String selected)
htmlOptions
public static final java.lang.String htmlOptions(java.lang.String[][] objects,
java.lang.String selected)
throws ACSException
- Returns a list of HTML option tags from an array of arrays of String pairs. The first of the pair is the
option value, the second is the text to be displayed.
- Parameters:
objects - an array of arrays of name value pairs. ie, something of the form:
new Object[][] = { {"true", "HTML"},
{"false", "Plain text"} }selected - the value of the default (selected) option
htmlOptions
public static final java.lang.String htmlOptions(MultiDataSource ds,
java.lang.String selected)
throws DataSourceException
- Assumes that in the given DataSource, the first column should
be used as the option text, and the second column should be
used as the option value.
fieldFormElement
public static final java.lang.String fieldFormElement(java.lang.String field_name,
java.lang.String column_type,
java.lang.String default_value)
- Creates a HTML form fragment of a type appropriate for the type of
data expected (eg radio buttons if the type is boolean). The
column_type can be any of the following: integer, number, date, text
(up to 4000 characters), text_short (up to 200 characters), boolean,
and special (no form element will be provided).
columnTypeWidget
public static final java.lang.String columnTypeWidget(java.lang.String name)
dateWidget
public static final java.lang.String dateWidget(java.lang.String fieldName)
dateWidget
public static final java.lang.String dateWidget(java.lang.String fieldName,
java.util.Date d)
dayList
public static final java.lang.String[] dayList()