Class JsonCallbackMethodProcessor

This is the core implementation of the JSON callback method handler that picks up POST data from the request and uses it to call the actual callback method on the specified object and return the results back as JSON.

This processor is generic and can be used easily from anywhere that needs to feed back JSON data from a method callback, simply calling the ProcessCallbackMethod() with an object that contains methods that are marked up with the [CallbackMethod] attribute.

For example, wwCallbackHandler simply forwards all processing like this:

public void ProcessRequest(HttpContext context) { // *** Pass off to the worker Callback Processor ICallbackMethodProcessor processor = new JsonCallbackMethodProcessor(); // *** Process the inbound request and execute it on this // *** Http Handler's methods processor.ProcessCallbackMethodCall(this); }

This processor is expected to execute in an environment where HttpContext.Current is available and where POST data is available to describe the incoming parameter data and method to call.


public class JsonCallbackMethodProcessor : object, ICallbackMethodProcessor

Class Members

ProcessCallbackMethodCall Generic method that handles processing a Callback request by routing to a method in a provided target object.
public sealed void ProcessCallbackMethodCall( object target );
WriteErrorResponse Returns an error response to the client from a callback. Code should exit after this call.
public sealed void WriteErrorResponse( string ErrorMessage );


Namespace: Westwind.Web.Controls
Assembly: westwind.ajaxtoolkit.dll

  Last Updated: 2/21/2008 | © West Wind Technologies, 2008