My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 236: Issue with formIds attribute with JQgrid
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  johgep
Closed:  Jul 2010

Sign in to add a comment
Reported by, Jul 7, 2010

What steps will reproduce the problem?
1. Add a form with text box on JQGrid sample jsp as 
<s:form id="testForm2">
<sj:textfield id="myText" name="myText" value="abcd" />
2. In <sjg:grid> tag add parameter as formIds="testForm2" and in corrosponding action class add attribute " private String myText" with getter and setters.
3. put sysout for myText in actio method for JQGrid.

What is the expected output? What do you see instead?
Expected output => "abcd" should be printed on console
Instead it is returnng as NULL. Form element values are not getting set in Struts2 action in case of sjg:grid. This same is working with sj:dialog and other tags.

Which struts2 version?

Which struts2-jquery plugin version?

Please provide any additional information below.

Jul 7, 2010
Project Member #1 johgep
can you please try out latest version.
Maybe this is solved with  Issue 186 
that should be fixed with version 2.2.0
Owner: johgep
Labels: Component-Grid-Plugin
Jul 7, 2010

I tried with version 2.2.0 as well. But still i am not getting the form attributes. :(
Please let me know if i am doing something wrong here or missing any step. Thanks,
Jul 13, 2010
Pls find below the JSON response.


Pls not value of myText is null, which is a text box in form whose id is specified in the JQGrid formids attribute.

I tried this with version 2.2.0 and 2.3.0 snapshot as well. Pls let me know solution for this as this is turning out to be show-stpper for my project. Thanks in advance.

Jul 20, 2010
Hi johgep,

can u pls look into this issue? This is becoming a show stopper for my project.


Jul 23, 2010
Project Member #5 johgep
there is a fix in the current SVN trunk for this issue.

I try it out with following steps.

Edit grid.jsp in grid showcase.

Add a JavaScript Function:

	function reloadGrid() {
		return false;

Add a Form:

<s:form id="gridSearchForm">
	<s:textfield name="lastname" label="Lastname"></s:textfield>
	<s:submit value="Search" onclick="reloadGrid(); return false;"/>

Add attributes to Grid Tag:


Now with every request there was send the value of textfield lastname.

Status: Started
Labels: Milestone-2.3.1
Jul 25, 2010
Project Member #6 johgep
(No comment was entered for this change.)
Status: Fixed
Jul 26, 2010
Hi johgep,

I really appreciate your quick turn around on this issue. Thanks..

I tried with 2.3.1 version like this

		function reloadGrid11() {
			var myGrid = $("#gridtable");

<s:form id="gridSearchForm">
			<s:textfield name="myText"></s:textfield>
			<input type="button" value="Search" onclick="reloadGrid11();"/>
		<s:url id="remoteurl" action="jsontable"></s:url>

But still i am getting myText veriable as NULL :(. I double checked that patch r1133 changes are present in struts2-jquery-grid-plugin.jar. Pls let me know if i am doing something wrong here. Thanks,


Jul 26, 2010
Project Member #8 johgep
submitting of form values does only works when you use the reloadTopics attribute provided by this plugin.

See the sample in comment 5 , else you must use your own implementation to submit additional values.
Oct 7, 2010
Has this been resolved.  I'm using 2.4.1 but the reloadTopics on the grid doesn't send the form element values to the Action class.  They're all null values
Oct 10, 2010
i m also using the same grid properties.while adding record in the grid its working fine.But while editing or deleting particular record i m getting ID attribute as null only. I tried several ways to get ID after row selection .But unable to find appropriate solution . please look into this.. help me...
Mar 21, 2013
I am also facing same problem, has somebody got any solutions.
Sign in to add a comment

Powered by Google Project Hosting