This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
(Struts2 -Jquery) Display data in a Grid after submitting a form.
Suresh Ganti
Greenhorn
Joined: Jun 12, 2011
Posts: 11
posted
0
Hi,
Can any one suggest one example to display data in a grid after submitting the form.
Here exactly what I am doing.
I have two date fields in a form. When ever I submit the form I need to search data from the backend based on the two data fields and I have to display the resulting data in a Grid.
How this can be possible?
Please find the sample code of mine below.
As shown above I need to display the date in the grid having id 'gridTable' when ever I submit the form "SampleAction.action"
Its important and urgent.
Please suggest one solution.
Thanks in advance.
Regards,
Suresh.
Johannes Geppert
Ranch Hand
Joined: Jan 12, 2010
Posts: 67
posted
0
You can try out reloadTopics in combination with formIds attribute.
I am vaey glad to saw reply from you.
I tried with the reloadTopics. But I am getting one stackoverflow exception if I use that.
Can you please suggest why it is coming.
Thanks,
Suresh.
Johannes Geppert
Ranch Hand
Joined: Jan 12, 2010
Posts: 67
posted
0
Please post the Stacktrace.
Johannes
Suresh Ganti
Greenhorn
Joined: Jun 12, 2011
Posts: 11
posted
0
Hi,
Please find the attached screen shot. I have traced the error in mozilla.
Thanks,
Suresh.
Johannes Geppert
Ranch Hand
Joined: Jan 12, 2010
Posts: 67
posted
0
Please Check follwing Points:
1.) Why is your gridModel Attribute empty? This must match a collection propertie of your JSON Action.
2.) How looks your JSON Result? Is it successfully?
3.) Do you have a recursion in your gridModel? If yes you should exclude this properties from JSON result via the JSON annotion.
Johannes
Suresh Ganti
Greenhorn
Joined: Jun 12, 2011
Posts: 11
posted
0
Hi,
1.) Why is your gridModel Attribute empty? This must match a collection propertie of your JSON Action.
Ans: I have declared appropriate collection for the gridModel.
2.) How looks your JSON Result? Is it successfully?
Ans: I have checked the Json result coming from the action. Using onSuscessTopics. So it is also coming good.
3.) Do you have a recursion in your gridModel? If yes you should exclude this properties from JSON result via the JSON annotion.
Ans:I didnt understand what exactly recursion is. Can you give some example for how to find and how to remove.
Thanks,
Suresh.
Suresh Ganti
Greenhorn
Joined: Jun 12, 2011
Posts: 11
posted
0
Hi,
One more thing I want to mention is, without declaring the targets attribute if the run the application it is just dowloading one .action file instead of refresing the page. can you please let me know if you can track the issue. please find the attached screen shot ot the same.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: (Struts2 -Jquery) Display data in a Grid after submitting a form.