This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes passing multiple values through hidden variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "passing multiple values through hidden variables" Watch "passing multiple values through hidden variables" New topic
Author

passing multiple values through hidden variables

sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
Hi

I am trying to pass multiple values through a hidden variable on a form post but am not getting the values in my form bean. What am i doing wrong?

jsp:

<html:hidden property="svalues" value="abc, def"/>

bean:

private String []svalues = null;

public String []getSvalues(){
return svalues;
}

public void setSvalues(String []values){
svalues = values;
}

TIA
S


Adios
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
The value of form parameter such as svalues is always going to be a String, not a String[]. You are going to have to parse that String yourself.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing multiple values through hidden variables
 
Similar Threads
Possibility for (Custom type objects) & (object arrays) in Form Bean
large form spanning across multiple jsp's
Action Form not populate with JSP hidden value
Form submit to bean reading null values
Struts Form Beans & Multicheckboxes