java.lang.Objecttelosys.objects.ScreenActions
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,
object parameters)
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()
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()
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()
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()
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()
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 |
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 |
setCallback(function callback)
Set the callback function (replace the default callback just for once) |
void |
setDefaultCallback(function callback)
Set the default callback function ( default callback for all future requests ) |
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()
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 |
protected void |
setTrace(boolean flag)
Set the trace flag |
void |
setViewsToRetrieve()
Adds views to retrieve after receiving the response |
void |
setViewToRetrieve(string sViewName)
Define a single view to retrieve (the view renderer 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 with 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()
public 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()
public void clearViewsToRetrieve()
public void showViewsToRetrieve()
public void setDefaultModeAsync()
public void setDefaultModeSync()
public void setModeAsync()
public void setModeSync()
public void setDefaultCallback(function callback)
callback
- public void setCallback(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, string sRenderer)
sViewName
- the view namesRenderer
- the renderer to use
public ScreenResponse doGetElements()
public ScreenResponse doGetViews()
public ScreenResponse doSet()
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()
public ScreenResponse doLoadView(string sViewName, string sRenderer)
sViewName
- the view namesRenderer
- the renderer to use
public ScreenResponse doLoadElements()
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, object parameters)
sProcName
- the procedure nameparameters
- object