java.lang.Objecttelosys.objects.ScreenActions
ScreenActions object
A "client-side" stub to invoke the server side actions with AJAX requests
Constructor Summary | |
ScreenActions(Screen screen)
Constructor The default AJAX mode is set to "synchronous" |
|
ScreenActions(Screen screen,
boolean flagAsync)
Constructor with AJAX mode parameter |
Method Summary | |
void |
clearElementsToRetrieve()
Clears all elements to retrieve |
void |
clearParameters()
Clears all parameters |
void |
clearViewsToRetrieve()
Clears all views to retrieve |
ScreenResponse |
doClear(boolean bUpdateScreen)
Invokes the standard "CLEAR" action to clear the Screen Context on the server |
ScreenResponse |
doClose()
Invokes the standard "CLOSE" action |
ScreenResponse |
doDelete(boolean bClearScreen,
boolean bUpdateScreen)
Invokes the standard "DELETE" action to delete data on the server |
ScreenResponse |
doExec(string sProcName,
boolean bUpdateScreen)
Executes the given procedure with the given parameters |
ScreenResponse |
doGet(boolean bUpdateScreen)
Invokes the standard "GET" action to get data from the server. |
ScreenResponse |
doGetElements(arguments elements)
Invokes the standard "GET" action to get data from the server. |
ScreenResponse |
doGetView(string sViewName)
Invokes the standard "GET" action to get data from the server. |
ScreenResponse |
doGetView(string sViewName,
string sRenderer)
Invokes the standard "GET" action to get data from the server. |
ScreenResponse |
doGetViews(arguments viewNames)
Invokes the standard "GET" action to get data from the server. |
ScreenResponse |
doInsert(boolean bUpdateScreen)
Invokes the standard "INSERT" action to insert data on the server |
ScreenResponse |
doListAdd(string sListName,
string sItemName,
number iOldIndex,
boolean bUpdateScreen)
Adds the given item on the list |
ScreenResponse |
doListClear(string sListName,
string sItemName,
number iOldIndex)
Clears the given item from the list |
ScreenResponse |
doListInsert(string sListName,
string sItemName,
number iOldIndex,
number iIndex,
boolean bUpdateScreen)
Inserts the given item on the list |
ScreenResponse |
doListRemove(string sListName,
string sItemName,
number iOldIndex,
number iIndex,
boolean bUpdateScreen)
Removes the given item from the list |
ScreenResponse |
doListSelect(string sListName,
string sItemName,
number iOldIndex,
number iIndex,
boolean bUpdateScreen)
Selects the given item of the list |
ScreenResponse |
doListSort(string sListName,
string sItemName,
number iOldIndex,
string sColumn,
string sOrder)
Sorts a list in the screen context ( VOList or DataSet ) |
ScreenResponse |
doLoad(boolean bUpdateScreen)
Invokes the standard "LOAD" action to load data from the server. |
ScreenResponse |
doLoadElements(arguments elementNames)
Invokes the standard "LOAD" action to load data from the server. |
ScreenResponse |
doLoadView(string sViewName)
Invokes the standard "LOAD" action to load data from the server. |
ScreenResponse |
doLoadView(string sViewName,
string sRenderer)
Invokes the standard "LOAD" action to load data from the server. |
ScreenResponse |
doLoadViews(arguments viewNames)
Invokes the standard "LOAD" action to load data from the server. |
void |
doNotClearContextData()
No "clear" when we execute an action |
void |
doNotGetContextData()
No "get" when we execute an action |
void |
doNotSetContextData()
No "set" when we execute an action |
ScreenResponse |
doOpen()
Invokes the standard "OPEN" action |
ScreenResponse |
doSave(boolean bUpdateScreen)
Invokes the standard "SAVE" action to save data on the server. |
ScreenResponse |
doSet(boolean bUpdateScreen)
Invokes the standard "SET" action to update data on the server. |
ScreenResponse |
doUpdate(boolean bUpdateScreen)
Invokes the standard "UPDATE" action to update data on the server |
protected ScreenRequest |
getRequest(string action)
INTERNAL : Do not use Returns a request with the given action and the parameters to send |
object |
getScreen()
Returns the screen instance |
number |
numberOfParameters()
Returns the current number of parameters |
protected void |
openWindowLastAction(string sURL,
string sRequest,
string sResponse)
INTERNAL : Do not use |
protected void |
populateFields(object oResponse)
INTERNAL : Do not use Populates the screen fields with XML data received |
protected object |
sendScreenData(string sAction,
function caller,
boolean bUpdateScreen)
INTERNAL : Do not use Sends a request to the server to execute a given action |
void |
setDefaultModeAsync()
Set the default mode to "Asynchronous" ( default mode for all future requests ) |
void |
setDefaultModeSync()
Set the default mode to "Synchronous" ( default mode for all future requests ) |
void |
setElementsToRetrieve(arguments elements)
Adds elements to retrieve after receiving the response |
void |
setElementToRetrieve(string sElementName)
Adds an element to retrieve after receiving the response |
void |
setModeAsync()
Set the mode "Asynchronous" (replace the default mode just for once) The next AJAX request will be sent in "Asynchronous" mode |
void |
setModeSync()
Set the mode "Synchronous" (replace the default mode just for once) The next AJAX request will be sent in "Synchronous" mode |
void |
setParameter(string sName,
string sValue)
Sets a parameter |
void |
setParametersFromFields()
Populates the action parameters with the values of all the fields declared in the screen. |
void |
setParametersFromFields(string elementName)
Populates the action parameters with the values of the fields belonging to the given element name. |
void |
setPermanentCallback(function callback)
Set the permanent callback function ( the callback to use by default for all future requests ) |
void |
setTemporaryCallback(function callback)
Set a temporary callback function ( replace the permanent callback just for once ) |
protected void |
setTrace(boolean flag)
Set the trace flag |
void |
setViewsToRetrieve(arguments viewNames)
Adds views to retrieve after receiving the response |
void |
setViewToRetrieve(string sViewName)
Define a single view to retrieve (the renderer associated with the view is used by default ) |
void |
setViewToRetrieve(string sViewName,
string sRenderer)
Define a single view to retrieve using a specific renderer to generate it |
void |
showElementsToRetrieve()
Shows (alert) all elements to retrieve |
void |
showLastAction()
Open a window to show the last action's request and response |
void |
showParameters()
Shows (alert) all parameters |
void |
showViewsToRetrieve()
Shows (alert) all views to retrieve |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ScreenActions(Screen screen)
screen
- : the screen instance (not null)public ScreenActions(Screen screen, boolean flagAsync)
screen
- : the screen instance (not null)flagAsync
- : true to set the default mode to "asynchronous"Method Detail |
protected void setTrace(boolean flag)
flag
- public object getScreen()
public void doNotClearContextData()
public void doNotSetContextData()
public void doNotGetContextData()
public void setParameter(string sName, string sValue)
sName
- the parameter namesValue
- the parameter valuepublic void clearParameters()
public void showParameters()
public void setElementToRetrieve(string sElementName)
sElementName
- the element namepublic void setElementsToRetrieve(arguments elements)
elements
- variable list of elements namespublic void clearElementsToRetrieve()
public void showElementsToRetrieve()
public void setViewToRetrieve(string sViewName)
sViewName
- public void setViewToRetrieve(string sViewName, string sRenderer)
sViewName
- the view namesRenderer
- the rendererpublic void setViewsToRetrieve(arguments viewNames)
viewNames
- variable list of views namespublic void clearViewsToRetrieve()
public void showViewsToRetrieve()
public void setDefaultModeAsync()
public void setDefaultModeSync()
public void setModeAsync()
public void setModeSync()
public void setPermanentCallback(function callback)
callback
- public void setTemporaryCallback(function callback)
callback
- public ScreenResponse doOpen()
public ScreenResponse doClose()
public ScreenResponse doGet(boolean bUpdateScreen)
bUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doGetView(string sViewName)
sViewName
- the view name
public ScreenResponse doGetView(string sViewName, string sRenderer)
sViewName
- the view namesRenderer
- the renderer to use
public ScreenResponse doGetElements(arguments elements)
elements
- variable list of elements names
public ScreenResponse doGetViews(arguments viewNames)
viewNames
- variable list of views names arguments
public ScreenResponse doSet(boolean bUpdateScreen)
bUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doClear(boolean bUpdateScreen)
bUpdateScreen
- true(clear the screen fields) | false(do not clear the screen fields)
public ScreenResponse doLoad(boolean bUpdateScreen)
bUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doLoadViews(arguments viewNames)
viewNames
- variable list of views names arguments
public ScreenResponse doLoadView(string sViewName)
sViewName
- the view name
public ScreenResponse doLoadView(string sViewName, string sRenderer)
sViewName
- the view namesRenderer
- the renderer to use
public ScreenResponse doLoadElements(arguments elementNames)
elementNames
- variable list of elements to retrieve after the load
protected void populateFields(object oResponse)
oResponse
- the server response objectprotected void openWindowLastAction(string sURL, string sRequest, string sResponse)
sURL
- sRequest
- sResponse
- public void showLastAction()
protected ScreenRequest getRequest(string action)
action
-
protected object sendScreenData(string sAction, function caller, boolean bUpdateScreen)
sAction
- : the action ("save"|"insert"|"update")caller
- : the caller functionbUpdateScreen
- : true(update the screen) | false(no screen update)
public ScreenResponse doSave(boolean bUpdateScreen)
bUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doInsert(boolean bUpdateScreen)
bUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doUpdate(boolean bUpdateScreen)
bUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doDelete(boolean bClearScreen, boolean bUpdateScreen)
bClearScreen
- true(clear the screen) | false(no screen clear)bUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doListSelect(string sListName, string sItemName, number iOldIndex, number iIndex, boolean bUpdateScreen)
sListName
- the list namesItemName
- the item nameiOldIndex
- the old indexiIndex
- the new indexbUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doListInsert(string sListName, string sItemName, number iOldIndex, number iIndex, boolean bUpdateScreen)
sListName
- the list namesItemName
- the item nameiOldIndex
- the old indexiIndex
- the new indexbUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doListAdd(string sListName, string sItemName, number iOldIndex, boolean bUpdateScreen)
sListName
- the list namesItemName
- the item nameiOldIndex
- the old indexbUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doListRemove(string sListName, string sItemName, number iOldIndex, number iIndex, boolean bUpdateScreen)
sListName
- the list namesItemName
- the item nameiOldIndex
- the old indexiIndex
- the new indexbUpdateScreen
- true(update the screen) | false(no screen update)
public ScreenResponse doListClear(string sListName, string sItemName, number iOldIndex)
sListName
- the list namesItemName
- the item nameiOldIndex
- the old index
public ScreenResponse doListSort(string sListName, string sItemName, number iOldIndex, string sColumn, string sOrder)
sListName
- the symbolic name of the list to sort ( the 'element name' of the list )sItemName
- the name of the list item to update if any ( can be null )iOldIndex
- the index of the list item to update if any ( can be null )sColumn
- the column to use as sort criteria ( VOList : attribute name, DataSet : column number )sOrder
- the sort order : "asc" for ascending order, "desc" for descending order ( can be null : automatic reverse )
public ScreenResponse doExec(string sProcName, boolean bUpdateScreen)
sProcName
- the procedure namebUpdateScreen
- true(update the screen) | false(no screen update)
public void setParametersFromFields(string elementName)
elementName
- the name of the elementpublic void setParametersFromFields()
public number numberOfParameters()