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.
I have been studying the peopleTable demo application (
http://directwebremoting.org/dwr-demo/reverseajax/peopleTable.html) and similar applications based on the web to come up with a solution for my problem. Most of these applications pass String or String arrays.
>>>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.
findInstuments methods JSON output as displayed in the program and can be easily integrated into the web page.
https://picasaweb.google.com/111228036846988065850/DWRFindInstumentsMethod#5697056122078739810 ">
https://picasaweb.google.com/111228036846988065850/DWRFindInstumentsMethod#5697056122078739810
>>>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