Hi folks,

I'm trying to get my head around using the select tag...

Basically to start with I need to produce a drop down that has three
options.  In HTML (as we all know!) it looks like this:

<select name="active">
  <option value=""></option>
  <option value="Y">Yes</option>
  <option value="N">No</option>
</select>

I've been able to get the following to work:

<jsp:useBean id="opt" class="java.util.Hashtable"/>
<%
  opt.put("", "");
  opt.put("Yes", "Y");
  opt.put("No", "N");
%>

<input:select name='active' options='<%= opt %>' default=''/>

What I'd like to know if it's possible to avoid having to load a Hashtable
with the balues first?  For example, I have tried <input:select
name='active' options='{Yes=Y, No=N, =}' default=''/> but this generates an
exception.  The {Yes=Y, No=N, =} is  generated when I merely put <%= opt %>
in the body of the JSP.  Am I missing something fundamental here?

I would greatly appreciate some guideance.

Thanks.
AB


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to