Cancel Process JPO for an Editable Table

The cancelProcessJPO parameter specifies the name of the JPO program and method to invoke during cancel processing.

Example to invoke the emxForm.jsp with cancelProcessJPO:

${COMMON_DIR}/emxTable.jsp?mode=Edit&table=<table_name>
&cancelProcessJPO=<JPO Name>:<Method Name>

If both a cancelProcessURL and cancelProcessJPO are specified, the cancelProcessURL executes first, followed by the cancelProcessJPO.

The cancel process JPO specifies the programMap as an argument for the cancel processing. The programMap contains the following HashMaps:


  • requestMap contains all the request parameters
  • paramMap contains these key parameters and expected values:
    Parameter Description

    objectId

    Object ID

    relId

    Relationship ID of the object

  • tableData contains all the table information

The above maps are packed using the packArgs method supported by JPO and passed to the cancel process JPO being invoked. The cancel process JPO can unpack this input parameter and use it for custom coding.

You can read the arguments passed for the pre process JPO as given below

HashMap programMap = (HashMap) JPO.unpackArgs(args);
HashMap paramMap = (HashMap) programMap.get("paramMap");
HashMap requestMap = (HashMap) programMap.get("requestMap");
HashMap tableMap = (HashMap) programMap.get("tableMap");

The requestMap contains the languageStr. You can read the value as shown below:

String languageStr = requestMap.get("languageStr");

The sample code in Preprocess JPO for an Editable Table shows how to retrieve the objectIds for the table.

The cancel process JPO returns a HashMap or returns nothing. The HashMap contains a single key, Message, that contains either a string resource key or an original text message to be displayed to the user. If the cancel Process JPO does not need to communicate to the table, it can return nothing (void) or an empty HashMap. In this case, the table will unload the page after completing the cancel process.