[prev in list] [next in list] [prev in thread] [next in thread]
List: taglibs-user
Subject: [INPUT] I need some clarification with using the select tag
From: "Adrian Beech" <a.beech () bigpond ! net ! au>
Date: 2004-09-17 8:54:22
Message-ID: 000001c49c93$ed64d370$020010ac () minbari
[Download RAW message or body]
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: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic