ucEditSubmit

Purpose

This provides an easier and quicker way to manipulate data instead of using the ucEditPreUpdate method.

Applies To

Edit Issue screen

Signature

public String ucEditSubmit ( 
      SesameSession session, 	// current session
      ProblemFormParam pfp)     // contains values of form params
}

Notes

This is called after the form is submitted during the Edit process and before the umbrella of problem objects is created. Any String returned by this method will cause the process to stop and the value of the String to be displayed to the user in the form of a JavaScript Alert Box. It allows access to the parameters before they have been manipulated.

Example

   public String ucEditSubmit(
                 SesameSession session,
                 ProblemFormParam values){
        String status = (String)values.get("STATUS");
        String msg = "";
        w("ucEditSubmit before rules: " + status);

        if(statusPendingApproval.equals(status)){
            doApproverLogic(values);
        }

        // execute the rules
        msg = super.ucEditSubmit(session,values);

        if (TextManager.isStringVisible(msg)){
            return msg;
        }
        status = (String)values.get("STATUS");
        w("ucEditSubmit after rules: " + status);

        //only check to set the status to approve if the request is in pending approval.
        if(statusPendingApproval.equals(status)){
            setNextApprover(values);
        }
        // w("Additional Approals required: " + additionalApprovalRequired);
        return msg;
    }