You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by vasile curelea <va...@gmail.com> on 2005/07/26 19:08:41 UTC

option selected with tag

Can't figure out how to use option selected with <input:select ..> tag
besides usage sample
<input:select name="choice" default="2" attributes="<%= a %>"
options="<%= o %>" />

All I want to achieve is preselect options based on user input.
Any sample implementation will help. thanks

               <c:choose>
                       <c:when test='${param.mkt == "4" || param.mkt
== "5" || param.mkt == "6" || param.mkt == "7" || param.mkt == "8" ||
param.mkt == "9"}'>
                       test 4,5,6,7,8,9
                       <input:select name="cur" default="US"
attributes="<%= scur %>" options="<%= cur %>" />
                       </c:when>
                       <c:when test='${param.mkt == "0" || param.mkt
== "1" || param.mkt == "2" || param.mkt == "3" || param.mkt == "20"}'>
                              <input:select name="cur" default="CAN"
attributes="<%= scur %>" options="<%= cur %>" />
                       </c:when>
                       <c:otherwise>
                               <input:select name="cur" default=""
attributes="<%= scur %>" options="<%= cur %>" />
                       </c:otherwise>
               </c:choose>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org