hungsama / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

Unable to modify grid's POST data before request #959

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
To Reproduce:
1. Create an action to handle grid data.
2. create an action to feed the page on which the grid will be placed.
3. Populate the grid based on a value passed from the page action.
4. loadBeforeSend (i.e. onBeforeTopics) is not able to manipulate the postData, 
it's too late.

Solution:
Incorporate jqGrid's beforeRequest event. If I understand correctly, this 
occurs before the ajax query is formulated.

Version: 3.5.1

Original issue reported on code.google.com by iscrib...@gmail.com on 21 Mar 2013 at 10:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This could be avoided by storing the pivot value in the session and using that 
to query when no value is provided. If the use case is such that a value is not 
always passed, conditional scriptlets could be used to set the grid action. It 
would improve code maintainability however to incorporate the beforeRequest 
event.

Original comment by dave.nap...@zirous.com on 1 Apr 2013 at 3:35