This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In my current Spring/JSF project I need integrate a method to push server side updates (Preferably as they happen) to the web based GUI to be displayed to the clients.
So to get started with things, I am working on this small application to get a feel of how DWR works.Basically, I've developed two variations to implement the server side push.
In the first approach, when the "find button" is pressed the back end updates are properly displayed.This makes a calls the findInstrumentSymbols() method in the InstrumentManager and returns the output as a List Objects through DWR.
How can make this functionality available as the default functionality every time a page loads without having to specifically activate it through a button?
In this implementation I was unable to return the output as a List Objects through DWR as in the first approach and had to be sent as a string array.I see that the new results are not populated properly as in the first approach and it tends to looses the new data when the "Disable button" is pressed.How can this required reverse server push functionality be properly achieved using DWR?
I have listed the code fragments below.I Would really appreciate any pointers on getting the revers Ajax functionality to operational.
I have used polling as as described in earlier DWR releases.What method would be most ideal to implement reverse Ajax functionality if switching to DWR3 is the way forward ?
Joined: Jan 09, 2012
Sorted out one part of the problem but I have had no luck withe the passing a java List<Instrument> using server side push as yet.
>>>This makes a calls the findInstrumentSymbols() method in the InstrumentManager and returns the output as a Object through DWR.
One thing I noticed in DWR was that when a DWR java script is called linked to a GUI operation such as Onclick (E.g.find button), Object or collection type data can be passed smoothly.I believe a JSON object is returned on this instance.
>>>But when you try to pass data to the webpage using server push operation,I was unable to return the output as before through DWR as in the first approach.It had to be sent as a string array.(based on the information I came across)
I based the server Push sample code on a variation of the peopleTable demo.It seems DWR provides little facility to send Collection or Objects to the GUI, though it is easily available when linked to a user operation where JSON objects are passed.(It seems to offers support for String /String arrays and String based collections or that is what I gathered :|)
The related code sample related to this description is listed below.(for the full code refer the original post)
When you try to alter this functionality to support other data types such List<Instrument> I couldn't find a Clean method as in the first instance where a Json object was passed - which was effortless.(I hope i haven't missed out something obvious :| )
Is there a better method that could be devised to transfer objects when using server push using this method ? (Resorting to String conversion seemed to be the method suggested in most of the web examples.)
Can data be exchanged as JSON Objects when server side push is performed without a GUI trigger to meet the same requirements? Is so what additional configuration changes and Updates would be required?
If a JSON based data transfer is possible for server side Push, could you please give some heads up on some document, site or sample code that may be of any assistance.Any such lead would be much appreciated for I have found nothing concrete on this topic
Thank You In Advance
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to use Spring / DWR Revers Ajax functionality to display dynamic changes to table data