Purpose

This is called by ExtraView during each Add Screen refresh.

Applies To

Add Issue screen

Signature

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

Notes

This method typically clears dependent values, performs lookups, and sets values from ExtraView or external sources.

Example

This example demonstrates how when the “System” (PROJECT_SYSTEM_NAME_RR) Repeating Row field is changed, we reset the “Primary Row” (PROJECT_SYSTEM_NAME_PRIMARY_RR) field value to the value of Yes” in only the first row, while setting all of the other values to null.

public String ucAddRefresh ( 
      SesameSession session,  // current session
      ProblemFormParam pfp)   // contains values of form params
{
    String areaId = (String)values.get("AREA");
    String projectId = (String)values.get("PROJECT");
    String whatChanged = whatChanged(values);

    // Write WARN message in log
    w("whatChanged: " + whatChanged);
		
    // Set Primary to first of Repeating Rows on Change Request,
    // when "System" field changed on a Row
    if ("P_PROJECT_SYSTEM_NAME_RR".equalsIgnoreCase(whatChanged) &&
        (A_CR_ID.equalsIgnoreCase(areaId) && P_CR_ID.equalsIgnoreCase(projectId)) )
    {
        String[] primaryRowsA = values.getArray("PROJECT_SYSTEM_NAME_PRIMARY_RR");
			
        // 12845 is the udfListId for the value of "Y" in this instance
        String[] primaryS = new String[primaryRowsA.length];
        for (int i=0; i < primaryS.length; i++)
        {
            if (i == 0) {
                primaryS[i] = "12845";
            } else {
                primaryS[i] = "{NULL}";
            }
        }
        values.put("PROJECT_SYSTEM_NAME_PRIMARY_RR", primaryS);
    }
}