:: Forum >> Version 2 >>

How to save data from a grid in struts

More information on this topic is available in the documentation section: /grid.examples/saving-changed-cells.html.

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
Monday, May 1, 2006
I have the same question, any sample code?
Richard
Friday, May 19, 2006
hey i too have the same problem, is any body there who can give a sample code for this
vegs
Tuesday, May 23, 2006
If someone find a sample/explanation please let me know! :D
arian.maykon@gmail.com
Maykon
Friday, June 9, 2006
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(textcolumnrow){
   var 
= 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
Wednesday, June 14, 2006
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
Wednesday, June 21, 2006
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
Tuesday, July 18, 2006
Hi,
We also have a similar requirement. Sending a single cell to the server every time will not be feasible.

Mandar Deshmukh
Monday, September 11, 2006
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
Monday, September 11, 2006



This topic is archived.

Back to /grid.examples/saving-changed-cells.html

Documentation:

Forum search