|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openpipeline.server.pages.AdminPage
public class AdminPage
Helper class for processing pages in the Admin UI. Most pages in the Admin have their own helper class that extends this one. Manages populating controls on the form, the page header, messages, and error handling.
| Constructor Summary | |
|---|---|
AdminPage()
|
|
| Method Summary | |
|---|---|
void |
addMessage(String msg)
|
void |
addMessages(List list)
|
String |
checkbox(String name,
boolean defaultValue)
Add a checkbox to the form. |
String |
checkbox(String name,
boolean defaultValue,
boolean includeCbName)
Same as checkbox(name, defaultValue), includes an option to omit the cbname field. |
static void |
convertParamsToXMLConfig(Map paramMap,
XMLConfig conf)
Convert the parameters to an XMLConfig object. |
static void |
convertXMLConfigToParams(XMLConfig conf,
Map paramMap)
Convert the XMLConfig object to parameters and add them to the existing parameters. |
boolean |
getBooleanParam(String name,
boolean defaultVal)
Get a boolean parameter out of the request. |
List |
getMessages()
|
String |
getParam(String name)
Get a string parameter |
String |
getParam(String name,
String defaultVal)
Get a string parameter. |
Map |
getParamMap()
|
String[] |
getParams(String name)
Return an array of values for the name |
void |
handleError(String message,
Throwable t)
|
String |
passwordField(String name)
Add a password field |
void |
populateParams(Map map)
Populate the parameter map with existing params. |
void |
processPage(javax.servlet.jsp.PageContext pageContext)
Initialize the page |
String |
radioButton(String name,
String value,
boolean defaultChecked)
Add a radio button to the form. |
String |
selectField(String name,
String options)
Convenience method for selectField(name, options, null); |
String |
selectField(String name,
String options,
String optionValues)
Add a select dropdown to the form. |
void |
setParam(String name,
String value)
Set the value of a param. |
String |
textArea(String name,
String cols,
String rows,
boolean wrap)
Add a text area control to the form. |
String |
textField(String name)
Add a text field |
String |
textField(String name,
int size)
Add a sized text field. |
String |
textField(String name,
int size,
int maxLength)
Add a sized text field with a maximum number of allowed characters. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AdminPage()
| Method Detail |
|---|
public void populateParams(Map map)
map - a map of name/value pairspublic Map getParamMap()
public void processPage(javax.servlet.jsp.PageContext pageContext)
pageContext - the pageContext variable from the jsp page
public String checkbox(String name,
boolean defaultValue)
public String checkbox(String name,
boolean defaultValue,
boolean includeCbName)
public String radioButton(String name,
String value,
boolean defaultChecked)
name - name of the button. If other buttons have the same name, they
will be part of the same radio groupvalue - the value the name will have when this control is checkeddefaultChecked - set this true if this button should be checked by default,
when the name does not have a value
public String textField(String name)
public String textField(String name,
int size)
public String textField(String name,
int size,
int maxLength)
public String passwordField(String name)
public String selectField(String name,
String options)
selectField(name, options, null);
name - name of the fieldoptions - visible options
public String selectField(String name,
String options,
String optionValues)
selectField("myname", "None,Red,Blue", ",red,blue");
name - name of the fieldoptions - visible options, must not be nulloptionValues - hidden values for each option, can be null
public String textArea(String name,
String cols,
String rows,
boolean wrap)
name - name of paramcols - columns in the controlrows - rows in the controlwrap - set true if word wrap should be on
public String getParam(String name,
String defaultVal)
public String getParam(String name)
public String[] getParams(String name)
public boolean getBooleanParam(String name,
boolean defaultVal)
public static void convertParamsToXMLConfig(Map paramMap,
XMLConfig conf)
conf -
public static void convertXMLConfigToParams(XMLConfig conf,
Map paramMap)
public List getMessages()
public void addMessage(String msg)
public void addMessages(List list)
public void handleError(String message,
Throwable t)
public void setParam(String name,
String value)
name - name of the paramvalue - the value of the param
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||