Announcement

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

    Operation or/and record level server error messages

    Is there a way to pass to the client upon a failed server data operation an error message associated with the operation or/and a record as a whole rather than with a specific field? I am so far not able to find one, so I attach messages to a dummy field name and then retrieve them in from the DsResponse in an EditFailedHandler. It works but seems kind of kludgy.

    #2
    Call dsResponse.setFailure() and call setData() with the (singular) error message as a String.

    Note that this type of error goes to central error handling (see RPCManager.addErrorHandler()), where the default is to show whatever message the server sent in a warning dialog.

    Comment


      #3
      Thank you very much! This works great for me.

      BTW, there seems to be no RPCManager.addErrorHandler(). You possibly had on mind RPCManager.setHandleErrorCallback() but I did not really try this because default behavior suits me.

      Comment


        #4
        Yes, you're correct, it's really setHandleErrorCallback().

        Comment

        Working...
        X