• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Probem of html:select

 
Irshad Malek
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one select box in my jsp per record,
there are some values are coming from database in that select box,
what i m doing i m just taking that values from database and setting it into object and that object i m setting into the list,

this is my code of jsp


<html:select property="name">
<html ptions collection="list" property="name" labelProperty="name" />
</html:select>

list i set into request from my action class

this list contains many names,
and i have one name per record and i want that to be selected that perticular name,

how i do,

Thank You

Irshad
 
Vijendra Runwal
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think for that you need to have different names for options property and select property.
The option property will help you set the selected value.
But in your case both the names are same.
try different names then try.
hope that might work out??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic