public class RAPPCallPanel extends RAPPAction
VirtualInterface
available for remote applications. Each callPanel instance
can be used to perform one of the following operations:
This class is probably the most used action, in conjunction with callObject.
This class contains methods with names as "request_NNN" and
"get_NNN". The name "NNN" matches the function with the same name
as in the VirtualInterface
. To call the panel with
a function, create an action with the appropriate "request_NNN"
call. Send the transaction to the server and get the reply.
Then call the function "get_NNN" to get the return value (similar
return value as the VirtualInterface).
Example:
RAPPTransaction trans=new RAPPTransaction(); // Sets the entry fields USERID and PASSWORD in the panel. RAPPCallPanel cp=new RAPPCallPanel("USERID"); cp.request_setText("MyUserID"); trans.addAction(cp); cp=new RAPPCallPanel("PASSWORD"); cp.request_setText(password); trans.addAction(cp); RAPPCallObject co=new RAPPCallObject("LOGON","",RAPPCallObject.CMD,""); trans.addAction(co); // On return of the reply, we want the STATUS text from the panel. cp=new RAPPCallPanel("STATUS"); cp.request_getText(); ...Send transaction and receive reply... // Get the application-defined status from the output // text control STATUS. String status=cp.get_getText();
Control IDs are used to reference controls of any kind. The maximum length is eight characters but to support addressing of controls in different notebook pages or different panels, the panel ID plus control ID can be combined with a slash (/). For example, get the text in the entry field 'ENTRY1' on the notebook page 'PAGE3': 'PAGE3/ENTRY1'.
There are three special control IDs that are used to reference different parts of the application: *APP, *PANEL and *MENUITEM. The first two can be used to set and get the title bar text of the application area or a panel. *MENUITEM (where MENUITEM is replaced by a menu ID) references a menu item in the application menu. The IDs *MENUITEM and *APP can not be combined with a panel ID as there can only be one application area. Example: The title bar text of the panel 'PAN1': 'PAN1/*PANEL'.
RAPPCallObject
,
VirtualInterface
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_callControl |
static int |
ACTION_deleteAll |
static int |
ACTION_deleteLine |
static int |
ACTION_getCell |
static int |
ACTION_getLine |
static int |
ACTION_getLineCount |
static int |
ACTION_getListData |
static int |
ACTION_getNextSelection |
static int |
ACTION_getText |
static int |
ACTION_insertLine |
static int |
ACTION_isChecked |
static int |
ACTION_isEnabled |
static int |
ACTION_isVisible |
static int |
ACTION_setCell |
static int |
ACTION_setChecked |
static int |
ACTION_setEnabled |
static int |
ACTION_setLine |
static int |
ACTION_setListData |
static int |
ACTION_setSelection |
static int |
ACTION_setText |
static int |
ACTION_setVisible |
ACTION_CALL_CLASS, ACTION_CALL_HOST, ACTION_CALL_OBJECT, ACTION_CALL_PANEL, ACTION_GLOB_VAR, ERROR_CALL_CLASS_RUN_ACTION, ERROR_CONTROL_ID_NOT_FOUND, ERROR_GLOB_VAR_NOT_FOUND, ERROR_HOST_FIELD_NOT_FOUND, ERROR_HOST_SESSION_NOT_CONNECTED, ERROR_INSTANCIATING_CALLED_CLASS, ERROR_INTERFACE_NOT_FOUND, ERROR_NOT_CURRENT_HOST_SCREEN, ERROR_OBJECT_NOT_FOUND, ERROR_UNEXPECTED_RETURN_STRING, errorCode, errorDescription
Modifier | Constructor and Description |
---|---|
protected |
RAPPCallPanel()
Creates an empty Call Panel action.
|
|
RAPPCallPanel(String controlID)
Creates an uninitialized Call Panel action to the specified
panel component ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
get_callControl()
Gets the reply after "Call" the control in question.
|
boolean |
get_deleteAll()
Gets the reply after "Deletes all lines" in a list capable control.
|
boolean |
get_deleteLine()
Gets the reply after line delete in a list capable control.
|
String |
get_getCell()
Gets a single cell in a list capable control.
|
RAPPLine |
get_getLine()
Gets a line in a list capable control.
|
int |
get_getLineCount()
Gets the line count for a list capable control.
|
RAPPLines |
get_getListData()
Requests the complete contents of a list capable control.
|
int |
get_getNextSelection()
Gets the next selected line in a list capable control.
|
String |
get_getText()
Gets the text of an item.
|
boolean |
get_insertLine()
Gets the reply after insertion of a line in a list capable control.
|
int |
get_isChecked()
Gets the check state of a control (e.g.
|
boolean |
get_isEnabled()
Gets the enabled state of an item.
|
boolean |
get_isVisible()
Gets the visibility state of an item.
|
boolean |
get_setCell()
Gets the reply after setting a single cell in a list capable control.
|
boolean |
get_setChecked()
Gets the reply after setting the check state of a control.
|
boolean |
get_setEnabled()
Gets the reply after setting the enabled state of an item.
|
boolean |
get_setLine()
Gets the reply after setting a line in a list capable control.
|
boolean |
get_setListData()
Gets the reply after setting the complete contents of a list capable
control.
|
boolean |
get_setSelection()
Gets the reply after setting a line as selected (or not) in a list
capable control.
|
boolean |
get_setText()
Gets the reply after setting the text of an item.
|
boolean |
get_setVisible()
Gets the reply after setting the visibility state of an item.
|
int |
getAction()
Gets the request action performed (zero if not yet set).
|
String |
getActionClass()
Returns the action class "callPanel".
|
int |
getActionType()
Gets the type of action for this class.
|
String |
getComment()
Comment for action class tag when serialized from a request
the first time.
|
String |
getControlID()
Gets the control ID for the action (null if not defined).
|
RAPPNameSpaceItem |
getNameSpaceItem()
Gets the namespace item for this action.
|
static int |
getRequestAction(String action)
Gets the request action value (ACTION_nnn) from a text,
e.g.
|
boolean |
getRequestBoolean()
Gets the boolean request value (false if not defined).
|
RAPPLine |
getRequestLine()
Gets the request line for line data (null if not defined).
|
RAPPLines |
getRequestList()
Gets the request list for list data (null if not defined).
|
int |
getRequestNumber1()
Gets the first integer request value (-1 if not defined).
|
int |
getRequestNumber2()
Get the second integer request value (-1 if not defined).
|
String |
getRequestString()
Gets the request string (null if not defined).
|
String |
paramString()
Gets the parameter string for this class for testing purposes.
|
void |
request_callControl()
Requests a "Call" the control in question.
|
void |
request_deleteAll()
Requests "Deletes all lines" in a list capable control.
|
void |
request_deleteLine(int line)
Requests a delete of a line in a list capable control.
|
void |
request_getCell(int col,
int line)
Requests a single cell in a list capable control.
|
void |
request_getLine(int line)
Requests a line in a list capable control.
|
void |
request_getLineCount()
Requests the line count for a list capable control.
|
void |
request_getListData()
Requests the complete contents of a list capable control.
|
void |
request_getNextSelection(int line)
Requests the next selected line in a list capable control.
|
void |
request_getText()
Requests gets the text of an item.
|
void |
request_insertLine(RAPPLine data,
int line)
Requests insertion of a line in a list capable control.
|
void |
request_isChecked()
Requests the check state of a control (e.g.
|
void |
request_isEnabled()
Requests the enabled state of an item.
|
void |
request_isVisible()
Requests the visibility state of an item.
|
void |
request_setCell(int col,
int line,
String data)
Requests setting a single cell in a list capable control.
|
void |
request_setChecked(int state)
Requests setting the check state of a control (e.g.
|
void |
request_setEnabled(boolean state)
Requests setting the enabled state of an item.
|
void |
request_setLine(RAPPLine data,
int line)
Requests setting a line in a list capable control.
|
void |
request_setListData(RAPPLines list)
Request setting the complete contents of a list capable control.
|
void |
request_setSelection(int line,
boolean select)
Requests setting a line as selected (or not) in a list capable
control.
|
void |
request_setText(String text)
Requests setting the text of an item.
|
void |
request_setVisible(boolean state)
Requests setting the visibility state of an item.
|
void |
serializeFromReply(RAPPElement reply)
Initializes the action class instance from a reply Element.
|
void |
serializeFromRequest(RAPPElement request)
Initializes the action class instance from a request Element.
|
void |
serializeToReply(RAPPElement reply)
Initializes the reply Element with all attributes.
|
void |
serializeToRequest(RAPPElement request)
Initializes the request Element with all attributes.
|
void |
setReply(boolean reply)
Sets the reply for the request as a boolean.
|
void |
setReply(int reply)
Sets the reply for the request as an integer.
|
void |
setReply(RAPPLine reply)
Sets the reply for the request as line data.
|
void |
setReply(RAPPLines reply)
Sets the reply for the request as list data.
|
void |
setReply(String reply)
Sets the reply for the request as a string.
|
appendReplyElement, appendReplyElement, appendRequestElement, getClass, getErrorCode, getErrorDescription, initialize, removeAllElements, setError, toString, updateReplyFromDocument
public static final int ACTION_setText
public static final int ACTION_getText
public static final int ACTION_setEnabled
public static final int ACTION_isEnabled
public static final int ACTION_setVisible
public static final int ACTION_isVisible
public static final int ACTION_setChecked
public static final int ACTION_isChecked
public static final int ACTION_getLineCount
public static final int ACTION_insertLine
public static final int ACTION_setLine
public static final int ACTION_getLine
public static final int ACTION_deleteLine
public static final int ACTION_deleteAll
public static final int ACTION_setCell
public static final int ACTION_getCell
public static final int ACTION_setSelection
public static final int ACTION_getNextSelection
public static final int ACTION_callControl
public static final int ACTION_getListData
public static final int ACTION_setListData
protected RAPPCallPanel()
public RAPPCallPanel(String controlID)
Use the methods request_NNN to initialize the Call Panel action with the request.
When the reply is available, use the matching get_NNN to get the result.
public static int getRequestAction(String action)
public RAPPNameSpaceItem getNameSpaceItem()
getNameSpaceItem
in class RAPPAction
public int getAction()
public String getControlID()
public boolean getRequestBoolean()
public int getRequestNumber1()
public int getRequestNumber2()
public String getRequestString()
public RAPPLine getRequestLine()
public RAPPLines getRequestList()
public void setReply(boolean reply)
public void setReply(int reply)
public void setReply(String reply)
public void setReply(RAPPLine reply)
public void setReply(RAPPLines reply)
public int getActionType()
getActionType
in class RAPPAction
public String getActionClass()
getActionClass
in class RAPPAction
public String getComment()
getComment
in class RAPPAction
public void serializeToRequest(RAPPElement request)
The XML for the node looks like (replace parenthesis with less-more-than signs):
(callPanelRequest action = "setText" subject = "CONTROLID" [ flag = {"true | "false} ] [ int1 = "1234" ] [ int2 = "-1" ] [ value = "stringReply" ] [ (nestTag) { nestTag is either "list" or "line" if any } [ ...data... ] (/nestTag) ] (/callPanelRequest)
serializeToRequest
in class RAPPAction
public void serializeFromRequest(RAPPElement request) throws SAXException
serializeFromRequest
in class RAPPAction
SAXException
- for errors in the document.public void serializeToReply(RAPPElement reply)
The XML for the node looks like (replace parenthesis with less-more-than signs):
(callPanelReply [ flag = { "true" | "false" } ] [ int = "123" ] [ value = "StringReply" ] [ action = { "line" | "lines" } ] [ (line) { when action="line" } (item value = "lineCell 1"/) (item value = "lineCell 2"/) (item value = "lineCell 3"/) (/line) ] [ (lines) { when action="lines" } (line) (item value = "col1 row1"/) (item value = "col2 row1"/) (/line) (line) (item value = "col1 row2"/) (item value = "col2 row2"/) (/line) (/lines) ] (/callPanelReply)
serializeToReply
in class RAPPAction
public void serializeFromReply(RAPPElement reply) throws SAXException
serializeFromReply
in class RAPPAction
SAXException
- for errors in the document.public void request_setText(String text)
public void request_getText()
public void request_setEnabled(boolean state)
public void request_isEnabled()
public void request_setVisible(boolean state)
public void request_isVisible()
public void request_setChecked(int state)
public void request_isChecked()
public void request_getLineCount()
public void request_insertLine(RAPPLine data, int line)
public void request_setLine(RAPPLine data, int line)
public void request_getLine(int line)
public void request_deleteLine(int line)
public void request_deleteAll()
public void request_setCell(int col, int line, String data)
public void request_getCell(int col, int line)
public void request_setSelection(int line, boolean select)
public void request_getNextSelection(int line)
public void request_callControl()
Note: The action only "calls" the control, but does not wait for it to complete its execution if the control is connected to a REXX Application. If you wish to wait for a REXX Application to complete, use the callObject action instead, to call the object that is connected to the push button or menu item directly.
public void request_getListData()
RAPPLines
.
Each line is an instance of RAPPLine
.public void request_setListData(RAPPLines list)
deleteAll
followed by multiple
insertLine
.public boolean get_setText()
public String get_getText()
public boolean get_setEnabled()
public boolean get_isEnabled()
public boolean get_setVisible()
public boolean get_isVisible()
public boolean get_setChecked()
public int get_isChecked()
public int get_getLineCount()
public boolean get_insertLine()
public boolean get_setLine()
public RAPPLine get_getLine()
public boolean get_deleteLine()
public boolean get_deleteAll()
public boolean get_setCell()
public String get_getCell()
public boolean get_setSelection()
public int get_getNextSelection()
public boolean get_callControl()
public RAPPLines get_getListData()
public boolean get_setListData()
public String paramString()
paramString
in class RAPPAction
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.