aspose file tools*
The moose likes Struts and the fly likes Probem of html:select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Probem of html:select" Watch "Probem of html:select" New topic
Author

Probem of html:select

Irshad Malek
Greenhorn

Joined: Aug 04, 2005
Posts: 25
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

Joined: Apr 17, 2006
Posts: 52
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??


SCJP 1.4,SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Probem of html:select