Jun 28th, 2011, 03:12 AM
Multiple Event Decoration using Spring JS
I'm building an application that uses Spring ajax event decoration to asynchronously send a request to the server and update a fragment on the page on completion (which is all working fine). What I'd like to do now is, whilst the request is being processed, display a message on another part of the page informing the user that their request is being handled. Additionally, once the async call completes, I'd like to update the message informing the user that their request has completed successfully.
I know that elements can be decorated with different types of functionality using numerous decorators (as per the decorator pattern), but I'm not sure how this might work with the functionality I require.
So I've got a couple of questions. Firstly, how would I display a message on a Div element using a Spring JS decorator? I imagine that I would need to create and add an additional event handler that will update the message Div. This handler would need to be added to the same element that's going to trigger the async call. I'm not sure how to do this.
I can't seem to find too much documentation/examples on Spring JS - I've looked at the reference applications and unfortunately there are no bits of code similar to what I'm trying to do.
Any information would be very much appreciated
Jun 29th, 2011, 09:42 AM
Tags for this Thread