www.webOShelp.net

Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

ErrorDialog

Example usage:

// feedRequestFailure
//
// Callback routine from a failed AJAX feed request (feedRequest);
// post a simple failure error message with the http status code.
//
FeedListAssistant.prototype.feedRequestFailure = function(transport) {
  // Use the Prototype template object to generate a string from the return status.
  //
  var t = new Template("Status #{status} returned from newsfeed request.");
  var m = t.evaluate(transport);
  // Log error & post dialog
  //
  Mojo.Log.info("Invalid feed - http failure (", m");
  Mojo.Controller.errorDialog("Invalid feed - http failure ("+m);
};

This dialog displays the Ajax error code appended to a static error message.  Note that there does not need to be an x-mojo-element div in the scene's HTML view file to use an error dialog widget.

Screenshot:

mojo error dialog

 

webOS UI Widget List