Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to set a validation Error

    Hi

    I'm using the GwtRpcDataSource and am strugling to get a validation message back to the user when doing a update


    Code:
    Map<String, String> errors = new LinkedHashMap<String, String>();
    errors.put(ex.getValidationExceptionFieldName(), caught.getMessage());
    response.setErrors(errors);
    SC.logWarn(ex.getValidationExceptionFieldName() + ":" + caught.getMessage());
    processResponse(requestId, response);
    I get the message that:
    Server returned VALIDATION_ERROR with no error message
    What am I doing wrong? (how do I give the error message)

    Here is the console output:
    Code:
    10:37:41.876:MUP3:WARN:Log:brandId:Opel(OP) is already linked to oem GM
    10:37:42.030:MUP3:WARN:RPCManager:Server returned VALIDATION_ERROR with no error message., response: {clientContext: Obj,
    status: -4,
    errors: Obj,
    context: undef,
    startRow: 0,
    endRow: 0,
    totalRows: 0}
Working...
X