Nitobi
Customer Login
Services
Products
About
Blogs
Contact
Home -> Product Knowledgebase Order Online | Free Trial Downloads

Nitobi Product Knowledgebase

How To Pass Handler Errors


In Grid 3.4, it is possible to pass messages from the server side handlers back to the Grid in the event of an error.  This article will describe the steps to be taken by you, the developer, to make use of this feature.

On The Server Side

If an error is encountered on the server side and you wish to communicate this to the client side, you can set an error message through a function provided by the API:

  • Classic ASP:  EBAGetHandler_SetErrorMessage(ErrorMessage) and EBASaveHandler_SetErrorMessage(ErrorMessage)
  • PHP:  EBAGetHandler::setErrorMessage($message) and EBASaveHandler::setErrorMessage($message)
  • JSP:  GetHandler.setErrorMessage(String message) and SaveHandler.setErrorMessage(String message)

On The Client Side

The Grid can access any errors generated by the get and save handlers by using the onhandlererrorevent attribute defined for the <ntb:grid> element.  If an error message has been set on the server side, the handlererror event will fire. 

To access the error message that was set by the handler, you can use the nitobi.data.DataTable.getHandlerError() method.  E.g.

var dataSource = nitobi.getGrid('gridID').getDataSource();
var errorMessage = dataSource.getHandlerError();

N.B.:  Support for handler errors will be coming for .NET and CFM in the near future.

View Printable Version

Comments:


Name:

Type the text you see above:

Comments:


Knowledgebase

To be notified of new articles when they're available, subscribe to our RSS feed.

Support Resources

Take advantage of our knowledgebase of product tutorials and tips, and our support forums!

Search Site


Sign up for our Newsletter:

Get industry articles and Nitobi company news in your inbox every couple of months — here's a sample!

Email:




Site RSS Feed  | All contents are (c) Copyright 2006, Nitobi Software Inc. All rights Reserved