3.2.0

How to save data from a grid in struts

We are using struts as a de facto standard for Web presentationTier.
how we can save the data and pass the changes cell data to struts action form and Action classes please help me to resolve the issue.
I am not able to find any help
Thanks
vikramaditya.garg@fidelity.co.in
Vikramaditya Garg
May 1,
I have the same question, any sample code?
Richard
May 19,
hey i too have the same problem, is any body there who can give a sample code for this
vegs
May 23,
If someone find a sample/explanation please let me know! :D
arian.maykon@gmail.com
Maykon
June 9,
There's a great sample on Saving Grid Content.

http://www.activewidgets.com/grid.examples/saving-changed-cells.html

You just have to apply the idea to a web application which uses Struts.

obj.onCellValidated = function(text, column, row){
   var r = new AW.HTTP.Request;
   r.setURL("updateSingleCell.do");
   r.setRequestMethod("POST");
   r.setParameter("column", column);
   r.setParameter("row", row);
   r.setParameter("text", text);
   r.request();

   r.response = function(data){
      alert(data); // process response data
   }
}


Basically, you need an Action that reads the request, processes the data in the request and sends a response. If you don't understand how to create a Struts Action that does that, then you really have no business working on a Struts application. (IMHO)
Geno
June 14,
Hi
I have already tried to use this code base and as per my self is concerned, I am worrying about the batch updates which I think is difficult.

Can u help me out how I can update the changes to multiple cell using a single request.?

I have a use case in user wants to modify the grid.he can modify any cell on the grid and later he will send the batch updates to datastore by clicking a save button.The request should not be made on each and every cell change.

Thanks
Vikramaditya Garg
vikramaditya.garg@fidelity.co.in
June 21,
I have the same question about the batch updates as you, Vikramaditya Garg. The request should not be made on every cell change.
Sittiwet Mahapratoom
July 18,
Hi,
We also have a similar requirement. Sending a single cell to the server every time will not be feasible.

Mandar Deshmukh
September 11,
You could build an array of even calls, and pass that list (as a string) in one request to an event on the server which could then parse that string and evaluate each method call.
Patrick
September 11,

This topic is archived.

See also:


Back to support forum