Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing multiple values through hidden variables

 
sandy gupta
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic