Announcement

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

    How to set willHandleError to true ?

    Hello everyone,

    i'm new in smartgwt, and i'm trying to make an add operation with a Callback in order to handle my errors myself.

    How can i modify my DSRequest and set the willHandleError to true ?

    #2
    Code:
     
    DSRequest requestProperties = new DSRequest();
    requestProperties.setWillHandleError(true);
    
    
    Listgrid.addData(Record record,
                        DSCallback callback,
                        DSRequest requestProperties)

    Comment


      #3
      thanks a lot, i tried this :

      Code:
      saveBtn.addClickHandler( new ClickHandler() {
      	public void onClick(final ClickEvent event) {
      		myForm.saveData( new DSCallback() {
      
      		@Override
      public void execute(DSResponse response, Object rawData, DSRequest request) {
      
      if ( response.getStatus() ==RPCResponse.STATUS_VALIDATION_ERROR ) {
      		SC.say( "validation errors ..." );
      	}
      if ( response.getStatus() ==RPCResponse.STATUS_FAILURE ) {
      		SC.say( "erreur .." );
      	} else {
      		SC.say( "sucess .." );
      
      	}
      
      }
      }, requestProperties );
      				
      			}
      		} );

      When i inspect my RPCResponse, i find a STATUS_VALIDATION_ERROR ( some fields are required) , but the callback is not called. Please have a look at my code, something is missing ?

      Comment

      Working...
      X