This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tricky html:multibox problem" Watch "tricky html:multibox problem" New topic

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?

Slava Lovkiy

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:
subject: tricky html:multibox problem
It's not a secret anymore!