• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Send a value from textfield in s:form into the json action

 
Armin Vetek
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a page which consists from two parts.
First part is a criteria form with some textfields and a search button.
Second part is a table with a result set. I am using jquery-grid to present the data in the table.

I do not know how to send a criteria input from critera form to a jsonAction.

My code snippet look like that:
1.JSP PAGE
<s:form action="requestList" >
<s:textfield key="criteria"></s:textfield>
<s:submit name="searchButton" key="global.search"/>
</s:form>
<s:url id="remoteurl" action="jsontable" />

<sjg:grid
id="customerstable"
dataType="json"
href="%{remoteurl}">
<sjg:gridColumn
name="id"
index="id" />
</sjg:grid>

2.The jsp page is refreshed when I click search button. JQuery-grid is also encapsulated in the jsp page and also the jquery-grid is refreshed at the same time. I do not know how to send the criteria value from s:form into the jSonTableAction.

jSonTableAction is used to populate the gridModel.

Regards,
Javanus
 
Armin Vetek
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put the criteria value to the session in the action one and I get the value from the session in the action two.

Regards,
Javanus
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic