|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.alsb.presentation.UIFactory
public class UIFactory
This class provides factory methods for creating Edit Field and different kinds of UI objects associated with the field. It also provides some helper methods for accessing values in these objects.
Field Summary |
---|
Fields inherited from interface com.bea.alsb.presentation.Constants |
---|
TYPE_BROWSER_TEXTBOX, TYPE_CHECKBOX, TYPE_CONFIRM, TYPE_DYN_TABLE, TYPE_EXPAND_TABLE, TYPE_HINT_TEXTAREA, TYPE_HINT_TEXTBOX, TYPE_PASSWORD, TYPE_SELECT, TYPE_SIMPLE_TABLE, TYPE_TEXTAREA, TYPE_TEXTBOX |
Constructor Summary | |
---|---|
UIFactory()
|
Method Summary | |
---|---|
static BrowserTextBoxObject |
createBrowserTextBox(String value,
int size,
String typeId)
Creates a browser textbox object. |
static BrowserTextBoxObject |
createBrowserTextBox(String value,
int size,
String typeId,
boolean hasEvent)
Creates a browser textbox object. |
static BrowserTextBoxObject |
createBrowserTextBox(String value,
int size,
String typeId,
boolean hasEvent,
ResourceQuery resourceQuery)
Creates a browser textbox object. |
static BrowserTextBoxObject |
createBrowserTextBox(String value,
String typeId)
Creates a browser textbox object. |
static CheckBoxObject |
createCheckbox(boolean checked)
Creates a checkbox object. |
static CheckBoxObject |
createCheckbox(String value,
boolean checked,
boolean hasEvent)
Creates a checkbox object that posts an update event back to the provider when it changes. |
static ConfirmationObject |
createConfirmation(String message,
boolean confirmed)
Creates a confirmation object. |
static DynamicTableObject |
createDynamicTable(String[] headers,
TextBoxObject[] uiobjects)
Creates a dynamic table object. |
static DynamicTableObject |
createDynamicTable(String[] headers,
TextBoxObject[] uiobjects,
List<String[]> rows)
Creates a dynamic table object. |
static EditField |
createEditField(String name,
String label,
String description,
boolean isrequired,
UIObject object)
Creates a edit field. |
static EditField |
createEditField(String name,
String label,
String description,
UIObject object)
Creates a edit field. |
static ExpandableTableObject |
createExpandableTableObject(List<ExpandableRowObject> rows,
String checkboxDescription)
Creates an expandable table object. |
static HintTextAreaObject |
createHintTextArea(String value,
String hint,
int size,
int numRows,
boolean readOnly)
Creates a hint textarea object. |
static HintTextBoxObject |
createHintTextBox(String value,
String hint,
int size)
Creates a hint textbox object. |
static PasswordObject |
createPassword(String value)
Creates a password object. |
static PasswordObject |
createPassword(String value,
int size)
Creates a password object. |
static SelectObject |
createSelectObject(Option[] options,
String selected,
int displayMode,
boolean hasEvent)
Creates a select object. |
static SelectObject |
createSelectObject(String[] values,
String[] formattedValues,
String selected,
int displayMode,
boolean hasEvent)
Creates a select object. |
static SimpleTableObject |
createSimpleTableObject(String[] headers,
List<SimpleRowObject> rows)
Creates a simple table object. |
static SimpleTableObject |
createSimpleTableObject(String[] headers,
List<SimpleRowObject> rows,
String width)
Creates a simple table object. |
static TextAreaObject |
createTextArea(String value,
int size,
int numRows,
boolean readOnly)
Creates a textarea object. |
static TextBoxObject |
createTextBox(String value)
Creates a textbox object. |
static TextBoxObject |
createTextBox(String value,
int size)
Creates a textbox object with a specified size. |
static TextBoxObject |
createTextBox(String value,
int size,
boolean readOnly)
Creates a textbox object with associated attributes. |
static boolean |
getBooleanValue(Map<String,UIObject> map,
String name)
Returns the value of the named field as a boolean. |
static int |
getIntValue(Map<String,UIObject> map,
String name)
Returns the value of the named field as an integer. |
static String |
getStringValue(Map<String,UIObject> map,
String name)
Returns the value of the named field as a string. |
static String |
getStringValue(UIObject uiobject)
Returns the value of the UI object as a string. |
static List<String[]> |
getStringValues(Map<String,UIObject> map,
String name)
Returns the list of string values for the named field. |
static List<String[]> |
getStringValues(UIObject uiobject)
Returns the list of string values for the UIObject; This is typically used for retrieving values from the table objects. |
static void |
setValue(UIObject uiObject,
String value)
Sets the value of a UI object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UIFactory()
Method Detail |
---|
public static EditField createEditField(String name, String label, String description, UIObject object)
name
- identifies the field.label
- label that displays on the form.description
- tool tip text that appears on a mouseover.object
- UI object associated with this field.
public static EditField createEditField(String name, String label, String description, boolean isrequired, UIObject object)
name
- identifies the field.label
- label that displays on the form.description
- tool tip text that appears on a mouseover.isrequired
- indicates if this is a required field.object
- UI object associated with this field.
public static TextBoxObject createTextBox(String value)
value
- the initial value for the textbox.
public static TextBoxObject createTextBox(String value, int size)
value
- the initial value for the textbox.size
- the size of the textbox.
public static TextBoxObject createTextBox(String value, int size, boolean readOnly)
value
- the initial value for the textbox.size
- the size of the textbox.readOnly
- if true the textbox is disabled for input.
public static CheckBoxObject createCheckbox(boolean checked)
checked
- the initial state for the checkbox.
public static CheckBoxObject createCheckbox(String value, boolean checked, boolean hasEvent)
value
- the value associated with the checkbox.checked
- the initial state for the checkbox.hasEvent
- true indicates that an update event is to be posted back to the provider when
the checkbox is changed.
public static SelectObject createSelectObject(String[] values, String[] formattedValues, String selected, int displayMode, boolean hasEvent)
values
- the actual values for each of the options.formattedValues
- the displayed text for each of the options.selected
- the default selection.displayMode
- the type of display presentation (list or radio buttons).hasEvent
- true indicates that an update event is to be posted back to the provider when
the checkbox is changed.
public static SelectObject createSelectObject(Option[] options, String selected, int displayMode, boolean hasEvent)
options
- the values and displayed text for the options.selected
- the default selection.displayMode
- the type of display presentation (list or radio buttons).hasEvent
- true indicates that an update event is to be posted back to the provider when
the checkbox is changed.
public static PasswordObject createPassword(String value)
value
- the initial value for the password.
public static PasswordObject createPassword(String value, int size)
value
- the initial value for the password.size
- the size of the password input field.
public static DynamicTableObject createDynamicTable(String[] headers, TextBoxObject[] uiobjects)
headers
- the labels for each column in the tableuiobjects
- input textbox objects used for adding new rows.
public static DynamicTableObject createDynamicTable(String[] headers, TextBoxObject[] uiobjects, List<String[]> rows)
headers
- the labels for each column in the tableuiobjects
- input textbox objects used for adding new rows.rows
- the initial list of rows in the table.
public static ConfirmationObject createConfirmation(String message, boolean confirmed)
message
- text to be displayed in the popup.confirmed
- initial state for the confirmation object.
public static BrowserTextBoxObject createBrowserTextBox(String value, String typeId)
value
- the initial value of the selected resource.typeId
- identifies the type of resource to be shown.
public static BrowserTextBoxObject createBrowserTextBox(String value, int size, String typeId)
value
- the initial value of the selected resource.size
- the size of the selection textbox field.typeId
- identifies the type of resource to be shown.
public static BrowserTextBoxObject createBrowserTextBox(String value, int size, String typeId, boolean hasEvent)
value
- the initial value of the selected resource.size
- the size of the selection textbox field.typeId
- identifies the type of resource to be shown.hasEvent
- true indicates that an update event is to be posted back to the provider when
the selection textbox is changed.
public static BrowserTextBoxObject createBrowserTextBox(String value, int size, String typeId, boolean hasEvent, ResourceQuery resourceQuery)
value
- the initial value of the selected resource.size
- the size of the selection textbox field.typeId
- identifies the type of resource to be shown.hasEvent
- true indicates that an update event is to be posted back to the provider when
the selection textbox is changed.resourceQuery
- query used to filter the resource chooser.
public static TextAreaObject createTextArea(String value, int size, int numRows, boolean readOnly)
value
- the initial value of the textarea.size
- the width of the textarea.numRows
- the number of rows in the textarea.readOnly
- if true the textarea is disabled for input.
public static HintTextBoxObject createHintTextBox(String value, String hint, int size)
value
- the initial value of the textbox.hint
- a short descriptive text hint to display near the textbox.size
- the size of the textbox.
public static HintTextAreaObject createHintTextArea(String value, String hint, int size, int numRows, boolean readOnly)
value
- the initial value of the textarea.hint
- a short descriptive text hint to display near the text area.size
- the width of the textarea.numRows
- the number of rows in the textarea.readOnly
- if true the textarea is disabled for input.
public static ExpandableTableObject createExpandableTableObject(List<ExpandableRowObject> rows, String checkboxDescription)
rows
- the list of expandable rows in the table.checkboxDescription
- tool tip descriptive text displayed when the mouse hovers over the checkbox.
public static SimpleTableObject createSimpleTableObject(String[] headers, List<SimpleRowObject> rows)
headers
- the labels for each column in the tablerows
- the list of rows in the table.
public static SimpleTableObject createSimpleTableObject(String[] headers, List<SimpleRowObject> rows, String width)
headers
- the labels for each column in the tablerows
- the list of rows in the table.width
- the HTML width of the table.
public static String getStringValue(UIObject uiobject)
uiobject
- the UI object whose value is to be retrieved
public static String getStringValue(Map<String,UIObject> map, String name)
map
- the map of field names to UIObjects (see EditField.getObjectMap(...)).name
- the name of the field whose value is to be retrieved.
public static int getIntValue(Map<String,UIObject> map, String name)
map
- the map of field names to UIObjects (see EditField.getObjectMap(...)).name
- the name of the field whose value is to be retrieved.
public static boolean getBooleanValue(Map<String,UIObject> map, String name)
map
- the map of field names to UIObjects (see EditField.getObjectMap(...)).name
- the name of the field whose value is to be retrieved.
public static List<String[]> getStringValues(UIObject uiobject)
public static List<String[]> getStringValues(Map<String,UIObject> map, String name)
map
- the map of field names to UIObjects (see EditField.getObjectMap(...)).name
- the name of the field whose value is to be retrieved.
public static void setValue(UIObject uiObject, String value)
uiObject
- the UIObject whose value is to be retrieved.value
- the string value for the object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |