Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

html:select  RSS feed

 
Satish Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following html:select
<html:select property="curruserlist" size="5" multiple="true" >
<html ptions name="<%=Constants.CURR_USER_NAMES%>" labelName="<%=Constants.CURR_USERS%>" />
</html:select>
I want everything in this to be selected by default.
Any idea
 
Junilu Lacar
Sheriff
Posts: 10879
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming that you are following the best practice of always going through Actions first, you need to set the ActionForm's curruserlist to an array that contains all values that you want selected. You do this before you forward to the JSP that displays the select. Struts will take care of the rest.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!