java.lang.Objecttelosys.objects.ScreenResponse
ScreenResponse object
The request response for "ScreenActions" and "ScreenService"
Constructor Summary | |
protected |
ScreenResponse(object oXHR)
Creates a new ScreenResponse object |
Method Summary | |
boolean |
dataFound()
Return true if the tag "found" is present in the response This flag is automaticaly set by the action "load" ( "found" or "not-found" ) |
boolean |
dataNotFound()
Return true if the tag "not-found" is present in the response This flag is automaticaly set by the action "load" ( "found" or "not-found" ) |
boolean |
dataVoid()
Returns true if there's no data element in the response ( when the tag "data" is void and has an attribute void="true" ) |
string |
getDataFieldValue(string tag,
string attr,
boolean childTag)
Return a tag field value |
ScreenException[] |
getExceptions()
Returns an array of exceptions, or null if there's no exception in the response |
number |
getHttpStatusCode()
Returns the HTTP status code ( from the HTTP header, "200" if OK, ... ) |
string |
getHttpStatusText()
Returns the HTTP status message ( from the HTTP header ) |
ScreenMessage[] |
getMessages()
Returns an array of messages, or null if there's no message in the response |
number |
getReadyState()
Returns the technical readyState value ( from XHR ) |
string |
getResponseText()
Returns the reponse content as a string |
object |
getResponseXML()
Returns the reponse content as an XML tree ( DOM ) |
string |
getReturnCode()
Returns the Telosys return code |
string |
getReturnMessage()
Returns the Telosys return message |
string |
getServiceViewContent()
Retuns content of the unique view ( for a service response ) |
string |
getValue(string name)
Return a single value of the response |
string |
getValues()
Return all the values of the response in a single object |
string |
getViewContent(string viewName)
Returns the content of the given view |
protected object |
getXmlTagData()
Returns the node object for the XML tag "data" ( XML node ) |
boolean |
hasView()
Returns true if there's a least one view in the response |
boolean |
isOK()
Returns true if the http response is OK ( readyState == 4 aa http status == 200 ) and if the telosys return code is "0" ( in the XML response ) |
void |
show()
Show the response in an alert message box |
void |
showValues()
Show all the values in an alert message box |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ScreenResponse(object oXHR)
oXHR
- : a reference on the XMLHttpRequest object used to send the requestMethod Detail |
public boolean isOK()
public string getResponseText()
public object getResponseXML()
public number getReadyState()
public number getHttpStatusCode()
public string getHttpStatusText()
public string getReturnCode()
public string getReturnMessage()
public boolean dataNotFound()
public boolean dataFound()
public boolean dataVoid()
public void show()
protected object getXmlTagData()
public string getDataFieldValue(string tag, string attr, boolean childTag)
tag
- : the tag name ( the "element" name )attr
- : the attribute namechildTag
- : if true returns the child tag content ( usefull for "LONG TEXT" )
public ScreenMessage[] getMessages()
public ScreenException[] getExceptions()
public string getValue(string name)
name
- : the name of the value
public string getValues()
public void showValues()
public boolean hasView()
public string getViewContent(string viewName)
viewName
- : the name of the view
public string getServiceViewContent()