Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

EditPageClosureForValidationError: using EditAttribute Request filter

  • 1.  EditPageClosureForValidationError: using EditAttribute Request filter

    Posted 09/23/20 05:26 AM

    Hi, Tried to get 'validationError dialogBox' the dialog box is coming but the 'EDIT' page gets closed. We have used 'editAttributes' request filter. Whereas, for ADD/CHECK-IN operation it is working fine.

    Below is the code snippet:

    JSONArray jsonPost =JSONArray.parse(request.getParameter("json_post"));

    JSONObject firstItem = (JSONObject) jsonPost.get(0);

    JSONArray jsonAttributes = (JSONArray) firstItem.get("criterias");

    JSONObject errorMessage = new JSONObject();

    JSONObject paramater = new JSONObject();

    JSONArray listError = new JSONArray();

    boolean flag=false;

    for (Object attribute : jsonAttributes) {

    JSONObject jsonAttribute = (JSONObject) attribute;

    String name = (String) jsonAttribute.get("name");

    try {

    if(name.equalsIgnoreCase("strsExport")) {

    String value=jsonAttribute.get("value").toString();

    if(value.equalsIgnoreCase("test")) {

    flag=true;

    }

    }

    } catch (Exception e) {

    continue;

    }}

    if(flag==true) {

    String explanation = "Coherence Control: One or more combination of property values is not authorized:";

    String userResponse = "Export : abc";

    paramater.put("text", "Validation Error");

    paramater.put("explanation", explanation);

    paramater.put("userResponse", userResponse);

    listError.add(paramater);

    errorMessage = new JSONObject();

    errorMessage.put("errors", listError);

    return errorMessage;

    }

    return null;

    }



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: EditPageClosureForValidationError: using EditAttribute Request filter

    Posted 09/24/20 02:38 AM

    ICN runtime code will not distinguish the documents created by 'Edit' or 'Non-Edit' ETs. They are filering the same request/response. I suggest you to use Browser debug tools to check the requests details and add debug logs in your Java code to find out the root cause.

    Br,

    Jason



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: EditPageClosureForValidationError: using EditAttribute Request filter

    Posted 09/24/20 04:23 AM