Hi Ian,
I think using DWR as the core library will come up with some
problems. For example
How do you get the return value for the javascript function you call?
(if receiveMessages() returns something )
How do you switch between polling and Comet?
Solution (From forum)
Right now you return values are not handled automatically - there is a
slightly manual solution where you arrange for your Javascript to call a
remoted method with the reply. You can change the method currently using
the following: DWREngine._pollComet = true; We'll have a better method
for this in the next release.
Any Comments?
Regards,
Animesh Saxena
RR Donnelley
Wipro Technologies
I don't believe in fear, I don't believe in faith, I don't believe in
anything that I can't break.
-Original Message-
From: Ian Roughley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 24, 2006 12:28 AM
To: dev@struts.apache.org
Subject: JavaOne Ajax Discussion
Hi everyone,
Wanted to document the discussion we had at JavaOne regarding ajax
support for Struts2. In attendance were Pat, myself and Martin from the
committers group, as well as Joe (from DWR) and a couple of other people
(my apologies for not writing down names).
The discussion focused around a couple of main points, these were:
1. There have been several cases lately that the ajax support was not
what users expected.
2. Dojo does not necessarily work the way that you would expect, making
debugging and new user orientation more difficult than needed.
3. Struts2 should provide a benefit to the user and not just wrap
pre-existing widgets/components
What we came up with is:
1. Struts2 should be able to work generically as a data source for any
ajax client. This would entail being able to return HTML and XML
results, but also JSON results. Additionally, as well as populating the
action from the HttpServletRequest we will look into populating it from
JSON and XML (this could be tricky as the XML structure would need to be
defined).
2. Struts2 should limit the number of ajax libraries it uses. It was
agreed to use DWR as the core library. Joe thought that a Struts2
creator that read could read existing Struts2 configuration files, and
expose a package would be fairly simple to do. This would avoid
additional configurations. Ajax integration via dojo would continue via
an independent struts-dojo project.
3. We should get out off the business of simply wrapping existing
widgets / components when we add no additional benefit to users.
Defining this distinction is a little harder. The easy examples are
obtaining remote content, providing ajax-based select lists (with
backing actions), data backed tables and mouse-over tips (obtained via
remote content) - things that need interaction with the server-side.
Ok... what does everyone think?
/Ian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not the
intended recipient, you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately and destroy all copies of this message and
any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted by this
email.
www.wipro.com