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

problem with html:option tag

Sham Grandhe
Ranch Hand

Joined: Dec 16, 2003
Posts: 73
Hi Friends,

this is sham, I have a problem with using the <html : option> of struts. In <option> tag of html we have a selected to mark the previous selected value or to display a particular value, but in case of the struts I didnt find one such as that. can some one help me

Thanking you

sham

[ December 15, 2004: Message edited by: kumar shyam ]
[ December 15, 2004: Message edited by: kumar shyam ]
Ankur Srivastava
Ranch Hand

Joined: May 11, 2004
Posts: 62
Hey you don't have to worry about it. If some value is already set in the form bean for this property that value will be shown as selected on the web page.

---------
Regards
Ankur
Sham Grandhe
Ranch Hand

Joined: Dec 16, 2003
Posts: 73
Hi Ankur,
Iam sorry for not giving the complete information. In my project the process goes like this. Iam actually updating the user profile, I have to retrieve data from the data base OK. now what I do is, the User is provided with the link and that link calls an action in order to retrieve data from the data base and send the object of the persistent class(hibernate). So there is no ? of form comming in between. and hence no data is initialized.

any thank you for the information.


regards
sham
Fletcher Estes
Ranch Hand

Joined: Jul 01, 2004
Posts: 108
For specific situations like this, you can always use the regular HTML tags as a substitute. It will work just as well:

<html:form>
<html:select name="selProperty">
<option value="one">One</one>
<option value="two" selected="selected">Two</option>
</html:select>
</html:form>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with html:option tag