• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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

 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!