StoreListener.onLoadException(Throwable error) dose not work

2 views
Skip to first unread message

Edward

unread,
Feb 27, 2008, 10:26:56 PM2/27/08
to GWT-Ext Developer Forum
It seems that StoreListener.onLoadException(Throwable error) dose not
work. Any one can help?

Here is my test code:

Store store = new Store(httpProxy, jsonReader)

store.addStoreListener(new StoreListenerAdapter() {
public void onLoadException(Throwable error) {
MessageBox.alert(error.toString());
}
});


In server side
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
{

// set response headers and content type
response.setHeader("Expires", "-1");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-control", "no-cache");
response.setHeader("Content-Type", "text/html; charset=utf-8");
response.setContentType("text/html; charset=utf-8");
// always send error to client to test
onLoadException()
response.sendError(500);
}

The onLoadException() is expected to be called. But nothing happened.
Reply all
Reply to author
Forward
0 new messages