wood burning stoves 2.0*
The moose likes Struts and the fly likes tricky html:multibox problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tricky html:multibox problem" Watch "tricky html:multibox problem" New topic
Author

tricky html:multibox problem

rick collette
Ranch Hand

Joined: Mar 22, 2002
Posts: 208
Hi, guys:

I have a jsp page that can display multiple checkboxes generated with
logic:iterate tag. The trick part is that I also have a search box to
search for certain items from the above list, people then can check
checkboxes of those search results, and click on a link to return to
the original page. I want the searched items still checked on the original page.

I have two action classes to handle the above and display the original page and page for search results using same jsp, and action form. Now the problem is that checked items on search results page are not checked once I return to the original page.

I use: request.getParameterValues() to get checked items in my action class, but always get null values.

I suspect this is because I use the same action form for two action classes?
I am wondering if you guys can explain to me what is wrong with my solution?

regards,
Slava Lovkiy
Greenhorn

Joined: Aug 17, 2005
Posts: 29
Please, note, if you use request.getParameterValues() than, the request should either contain parameres in url or this should be a POST request to the page, so that all input field from form being passed to action.

It is not clear for me what is the workflow of you app., but I think you can try to play with the 'scope' attribute of ActionForm used in both actions, on original page and search box.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tricky html:multibox problem