File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need suggestions and help for my scenario in struts

 
kaushal sharma
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

As I am new to Struts, I need to develop a scenario.

I need to create a select box on my JSP page the values in this select box will be coming from the database.

When I select an option from the select box, the other values from the same table will be populated on the same JSP page but in a tabular format.

The values will be in a form format, including some text boxes and checkboxes.

Kindly suggest me with some examples or scenario.


-Thanks & Regards,
Kaushal K. Sharma

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you want an Ajax request fired off when the select box changes.
 
kaushal sharma
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

I understand your suggestion but i want to use javascript as i know we can get an ID of every select option, so can't we send the ID to my Action Servlet when it's selected? It may feel the page is refreshed or do we try something else?



-Thanks & regards,
Kaushal K. Sharma




 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I may be misunderstanding you.

My suggestion *was* to use JavaScript, make an Ajax request when the select box is changed, and send back just the HTML for the table containing the data based on the ID (or whatever) selected in the select box.
 
kaushal sharma
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

hope you would have some documents available online in response to my work. i do not know AJAX. Please suggest me so, that i will be able to understand the development part.


-Thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're going to use Ajax, just search the web for Ajax. I'd *strongly* recommend using a JavaScript library if you go that route--doing it without a library (like jQuery, Prototype, whatever) is a pretty bad idea.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic