Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with html:option tag

 
Sham Grandhe
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic