aspose file tools*
The moose likes Struts and the fly likes Question of multiboxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Question of multiboxes" Watch "Question of multiboxes" New topic
Author

Question of multiboxes

Mnau Lubi
Ranch Hand

Joined: Mar 17, 2010
Posts: 32
Hi!

I am using multiboxes inside a logic:iterate and it is working fine. What I am wondering now is if it is possible to pass URL variables using check boxes. I explain myself:

In my application, I share a song with a friend. When I want to share it, I access to a web page where all my friends are listed with multiboxes. There, I can select the friends I want to share the song with. The problem is that I would like to send the name of the friend and the name of the song as a URL variable to the FrowardAction. Before using multiboxes, I clicked in the name of the friend to share the song, which was a link. Obviously this way I could just share my song with one friend each time. I did it this way:




the variable sharecontentparams was carrying all the information and in the link URL I could see ....name=NameOfTheSong&friend=NameOfTheFriend.However, using multiboxes I cannot do that. I tried this:



But in the ForwardAction I get a String called sharecontentparams when I do the request.getParameters() and not the parameters friend and name.

Can anyone help me please?

Thanks in advanced
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
<html:multibox property="multiBox" value="sharecontentparams"/>

You are assigning the vaue to the Striing "sharecontentparams". Change that to that variable sharecontentparams. I don't remember the syntax.
Mnau Lubi
Ranch Hand

Joined: Mar 17, 2010
Posts: 32
Tom Reilly wrote:
<html:multibox property="multiBox" value="sharecontentparams"/>

You are assigning the vaue to the Striing "sharecontentparams". Change that to that variable sharecontentparams. I don't remember the syntax.


Can you search for it please? I cannot find anything.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Question of multiboxes