Hi!
I would like to comment you a problem I have now when developing a web
application using Struts 2.
I have a collection of items, which I want to show in a table. Those
items have some attributes that change with the time and I would like
to show the updated state in the view layer. I don´t know very well
how to achieve this. I suppose I must be polling the web server and
getting the whole collection each time, but this collection may be
huge, so I don´t think it would be a nice approach. What I would like
most would be changing only those attributes that changed from the
last polling.
Supposing that I have an action at the model layer that returns me a
collection with only those item that have changed (the first time it
must return me the whole items), (or maybe, I could have 2 actions:
one for ask if sth has changed and another one to retrieve the whole
collection -if sth has changed-), how can I modify the HTML to update
the shown content? Could I convert the item's collection in the
controller action to JSON and retrieve it in the jspx? It is, call
this controller action directly from javascript? Is there an easier
way to do this using Struts2 or do I have to use "AJAX raw"?
To sum up:
controller action -> model action -> returns collection<Item> ->
controller action returns jspx where I draw the table. Now how do I
update this table? The easy way would be using an s:div tag with
href="action" and a timer to update it, but it would involve update
the whole table.
Any help would be grateful.
Thanks.
----------------------------------------------------------------
http://www.denodo.com
Aviso Legal
Este mensaje es solamente para la persona a la que va dirigido.
Sus contenidos y cualquier archivo adjunto son confidenciales.
Si usted lo ha recibido por error, le rogamos que lo borre y
lo notifique a [EMAIL PROTECTED]
Gracias.
Legal Notice
This message is intended for the addressee only and its contents
and any attached files are strictly confidential.
If you have received it in error, please remove this mail and
contact [EMAIL PROTECTED]
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]