org.springframework.extensions.webscripts
Class ScriptWizard
java.lang.Object
org.springframework.extensions.webscripts.ScriptWizard
- All Implemented Interfaces:
- Serializable
public final class ScriptWizard
- extends Object
- implements Serializable
TODO: delete this class - no more server-side wizard support
- Author:
- muzquiano
- See Also:
- Serialized Form
Method Summary |
void |
addButton(String id,
String text,
String action,
String data,
boolean enabled,
boolean hidden)
|
void |
addElement(String name,
String value)
|
void |
addElementFormat(String name,
String label,
String type)
|
void |
addElementFormat(String name,
String label,
String type,
int width)
|
void |
addElementFormat(String name,
String label,
String type,
int width,
int height)
|
void |
addElementFormatKeyPair(String name,
String key,
boolean value)
|
void |
addElementFormatKeyPair(String name,
String key,
String value)
|
void |
addElementSelectionValue(String name,
String selectionId,
String selectionValue)
|
void |
addGridColumn(String id,
String text)
|
void |
addGridColumnFormat(String id,
String width,
String sortable)
|
void |
addGridData(Object[] array)
|
void |
addGridNoDataMessage(String message)
|
void |
addGridToolbar(String id,
String text,
String tooltip,
String iconCls)
|
void |
addGridToolbarSpacer()
|
void |
addHiddenElement(String name,
String value)
|
void |
addPage(String id,
String uri,
boolean finish)
|
protected org.json.JSONArray |
buttons()
|
protected org.json.JSONObject |
current()
|
protected org.json.JSONObject |
data()
|
void |
disableButton(String id)
|
protected org.json.JSONArray |
elementFormats()
|
protected org.json.JSONArray |
elements()
|
protected org.json.JSONObject |
elementValues()
|
void |
enableButton(String id)
|
protected org.json.JSONArray |
ensureJSONArray(org.json.JSONObject obj,
String arrayName)
|
protected org.json.JSONObject |
ensureJSONObject(org.json.JSONObject obj,
String objectName)
|
protected Map |
ensureMap()
|
void |
finalize()
|
org.json.JSONObject |
getButton(String id)
|
String |
getCurrentPageId()
|
String |
getElementStringValue(String name)
|
Object |
getElementValue(String name)
|
protected javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
|
String |
getId()
|
Map<String,Object> |
getModel()
|
String |
getResponse()
|
String |
getSafeElementValue(String elementName)
|
String |
getSafeProperty(ScriptModelObject obj,
String propertyName)
|
protected org.json.JSONObject |
grid()
|
void |
hideButton(String id)
|
void |
init()
|
void |
init(String jsonRequestString)
|
boolean |
isCurrentPageEnd()
|
boolean |
isCurrentPageStart()
|
protected org.json.JSONArray |
pages()
|
protected void |
processRequest()
|
void |
putResponse(String str)
|
String |
request(String name)
|
String |
sessionGet(String name)
|
String |
sessionGet(String name,
String defaultValue)
|
void |
sessionPut(String name,
String value)
|
void |
sessionRemove(String name)
|
void |
setBrowserReload(boolean reload)
|
void |
setCacheInvalidateAll()
|
void |
setCurrentPageId(String currentPageId)
|
void |
setDialogForm()
|
void |
setDialogHTML(String html)
|
void |
setDialogType(String dialogType)
|
void |
setDialogURL(String url)
|
void |
setFormFieldFocus(String id,
String selectText,
String focusCls)
|
void |
setId(String id)
|
void |
setModel(Map<String,Object> model)
|
void |
setRedirectToPage(String pageId)
|
void |
setResponse(String key,
boolean value)
|
void |
setResponse(String key,
Object value)
|
void |
setResponse(String key,
String value)
|
void |
setResponseCode(String code)
|
void |
setResponseCodeFinish()
|
void |
setResponseCodeOK()
|
void |
setResponseMessage(String message)
|
void |
setResponseTitle(String title)
|
void |
setResponseURI(String uri)
|
void |
showButton(String id)
|
void |
updateElement(String name,
String value)
|
context
protected RequestContext context
request
protected org.json.JSONObject request
response
protected org.json.JSONObject response
id
protected String id
currentPageId
protected String currentPageId
previousPageId
protected String previousPageId
isCurrentPageStart
protected boolean isCurrentPageStart
isCurrentPageEnd
protected boolean isCurrentPageEnd
model
protected Map<String,Object> model
ScriptWizard
public ScriptWizard(RequestContext context)
getHttpServletRequest
protected javax.servlet.http.HttpServletRequest getHttpServletRequest()
setResponse
public void setResponse(String key,
String value)
setResponse
public void setResponse(String key,
boolean value)
setResponse
public void setResponse(String key,
Object value)
getId
public String getId()
setId
public void setId(String id)
init
public void init()
throws org.json.JSONException,
org.dom4j.DocumentException
- Throws:
org.json.JSONException
org.dom4j.DocumentException
init
public void init(String jsonRequestString)
throws org.json.JSONException,
org.dom4j.DocumentException
- Throws:
org.json.JSONException
org.dom4j.DocumentException
processRequest
protected void processRequest()
throws org.dom4j.DocumentException,
org.json.JSONException
- Throws:
org.dom4j.DocumentException
org.json.JSONException
getCurrentPageId
public String getCurrentPageId()
isCurrentPageStart
public boolean isCurrentPageStart()
isCurrentPageEnd
public boolean isCurrentPageEnd()
setCurrentPageId
public void setCurrentPageId(String currentPageId)
finalize
public void finalize()
- Overrides:
finalize
in class Object
request
public String request(String name)
throws org.json.JSONException
- Throws:
org.json.JSONException
setCacheInvalidateAll
public void setCacheInvalidateAll()
throws org.json.JSONException
- Throws:
org.json.JSONException
setBrowserReload
public void setBrowserReload(boolean reload)
throws org.json.JSONException
- Throws:
org.json.JSONException
setDialogType
public void setDialogType(String dialogType)
throws org.json.JSONException
- Throws:
org.json.JSONException
setDialogForm
public void setDialogForm()
throws org.json.JSONException
- Throws:
org.json.JSONException
setDialogHTML
public void setDialogHTML(String html)
throws org.json.JSONException
- Throws:
org.json.JSONException
setDialogURL
public void setDialogURL(String url)
throws org.json.JSONException
- Throws:
org.json.JSONException
setResponseCode
public void setResponseCode(String code)
throws org.json.JSONException
- Throws:
org.json.JSONException
setResponseCodeOK
public void setResponseCodeOK()
throws org.json.JSONException
- Throws:
org.json.JSONException
setResponseCodeFinish
public void setResponseCodeFinish()
throws org.json.JSONException
- Throws:
org.json.JSONException
setResponseMessage
public void setResponseMessage(String message)
throws org.json.JSONException
- Throws:
org.json.JSONException
setResponseTitle
public void setResponseTitle(String title)
throws org.json.JSONException
- Throws:
org.json.JSONException
setResponseURI
public void setResponseURI(String uri)
throws org.json.JSONException
- Throws:
org.json.JSONException
setFormFieldFocus
public void setFormFieldFocus(String id,
String selectText,
String focusCls)
throws org.json.JSONException
- Throws:
org.json.JSONException
setRedirectToPage
public void setRedirectToPage(String pageId)
throws org.json.JSONException
- Throws:
org.json.JSONException
data
protected org.json.JSONObject data()
throws org.json.JSONException
- Throws:
org.json.JSONException
elements
protected org.json.JSONArray elements()
throws org.json.JSONException
- Throws:
org.json.JSONException
elementFormats
protected org.json.JSONArray elementFormats()
throws org.json.JSONException
- Throws:
org.json.JSONException
elementValues
protected org.json.JSONObject elementValues()
throws org.json.JSONException
- Throws:
org.json.JSONException
buttons
protected org.json.JSONArray buttons()
throws org.json.JSONException
- Throws:
org.json.JSONException
pages
protected org.json.JSONArray pages()
throws org.json.JSONException
- Throws:
org.json.JSONException
grid
protected org.json.JSONObject grid()
throws org.json.JSONException
- Throws:
org.json.JSONException
current
protected org.json.JSONObject current()
throws org.json.JSONException
- Throws:
org.json.JSONException
ensureJSONObject
protected org.json.JSONObject ensureJSONObject(org.json.JSONObject obj,
String objectName)
throws org.json.JSONException
- Throws:
org.json.JSONException
ensureJSONArray
protected org.json.JSONArray ensureJSONArray(org.json.JSONObject obj,
String arrayName)
throws org.json.JSONException
- Throws:
org.json.JSONException
addElement
public void addElement(String name,
String value)
throws org.json.JSONException
- Throws:
org.json.JSONException
addHiddenElement
public void addHiddenElement(String name,
String value)
throws org.json.JSONException
- Throws:
org.json.JSONException
updateElement
public void updateElement(String name,
String value)
throws org.json.JSONException
- Throws:
org.json.JSONException
addElementFormat
public void addElementFormat(String name,
String label,
String type)
throws org.json.JSONException
- Throws:
org.json.JSONException
addElementFormat
public void addElementFormat(String name,
String label,
String type,
int width)
throws org.json.JSONException
- Throws:
org.json.JSONException
addElementFormat
public void addElementFormat(String name,
String label,
String type,
int width,
int height)
throws org.json.JSONException
- Throws:
org.json.JSONException
addElementFormatKeyPair
public void addElementFormatKeyPair(String name,
String key,
String value)
throws org.json.JSONException
- Throws:
org.json.JSONException
addElementFormatKeyPair
public void addElementFormatKeyPair(String name,
String key,
boolean value)
throws org.json.JSONException
- Throws:
org.json.JSONException
addElementSelectionValue
public void addElementSelectionValue(String name,
String selectionId,
String selectionValue)
throws org.json.JSONException
- Throws:
org.json.JSONException
getElementValue
public Object getElementValue(String name)
throws org.json.JSONException
- Throws:
org.json.JSONException
getElementStringValue
public String getElementStringValue(String name)
throws org.json.JSONException
- Throws:
org.json.JSONException
addButton
public void addButton(String id,
String text,
String action,
String data,
boolean enabled,
boolean hidden)
throws org.json.JSONException
- Throws:
org.json.JSONException
getButton
public org.json.JSONObject getButton(String id)
throws org.json.JSONException
- Throws:
org.json.JSONException
enableButton
public void enableButton(String id)
throws org.json.JSONException
- Throws:
org.json.JSONException
disableButton
public void disableButton(String id)
throws org.json.JSONException
- Throws:
org.json.JSONException
hideButton
public void hideButton(String id)
throws org.json.JSONException
- Throws:
org.json.JSONException
showButton
public void showButton(String id)
throws org.json.JSONException
- Throws:
org.json.JSONException
addPage
public void addPage(String id,
String uri,
boolean finish)
throws org.json.JSONException
- Throws:
org.json.JSONException
addGridData
public void addGridData(Object[] array)
throws org.json.JSONException
- Throws:
org.json.JSONException
addGridColumn
public void addGridColumn(String id,
String text)
throws org.json.JSONException
- Throws:
org.json.JSONException
addGridColumnFormat
public void addGridColumnFormat(String id,
String width,
String sortable)
throws org.json.JSONException
- Throws:
org.json.JSONException
addGridToolbar
public void addGridToolbar(String id,
String text,
String tooltip,
String iconCls)
throws org.json.JSONException
- Throws:
org.json.JSONException
addGridToolbarSpacer
public void addGridToolbarSpacer()
throws org.json.JSONException
- Throws:
org.json.JSONException
addGridNoDataMessage
public void addGridNoDataMessage(String message)
throws org.json.JSONException
- Throws:
org.json.JSONException
ensureMap
protected Map ensureMap()
sessionPut
public void sessionPut(String name,
String value)
sessionGet
public String sessionGet(String name)
sessionGet
public String sessionGet(String name,
String defaultValue)
sessionRemove
public void sessionRemove(String name)
getResponse
public String getResponse()
putResponse
public void putResponse(String str)
throws org.json.JSONException
- Throws:
org.json.JSONException
getSafeProperty
public String getSafeProperty(ScriptModelObject obj,
String propertyName)
getSafeElementValue
public String getSafeElementValue(String elementName)
throws org.json.JSONException
- Throws:
org.json.JSONException
setModel
public void setModel(Map<String,Object> model)
getModel
public Map<String,Object> getModel()
Copyright © 2009 SpringSource, Inc. All Rights Reserved.