Can I bind postHook to each requect

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Can I bind postHook to each requect

disller
Cos I need to wrap some remote call into call back( I do not know what is the remote call ), I need do different things when the getting the response( onStateChanged ),such before the remote call, the system generate a task id and remove it when finish the call , so I want to set the postHook, but, this postHook is a global stuff, another remote call will still call this postHook.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Can I bind postHook to each requect

david@butterdev.com
Yes.  See
http://directwebremoting.org/dwr/introduction/scripting-dwr.html - "Call
Options Object".

Remote.call({
     callback:yourCallBackFunction,
     postHook:yourPostHookFunction
});

On 01/19/2012 04:43 PM, disller wrote:

> Cos I need to wrap some remote call into call back( I do not know what is the
> remote call ), I need do different things when the getting the response(
> onStateChanged ),such http://directwebremoting.org/dwr/introduction/scripting-dwr.htmlbefore the remote call, the system generate a task id
> and remove it when finish the call , so I want to set the postHook, but,
> this postHook is a global stuff, another remote call will still call this
> postHook.
>
> --
> View this message in context: http://dwr.2114559.n2.nabble.com/Can-I-bind-postHook-to-each-requect-tp7205871p7205871.html
> Sent from the DWR - Users mailing list archive at Nabble.com.
>

Loading...