struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Lenz" <...@viessmann.com>
Subject Dynamic select menu
Date Mon, 05 May 2003 13:37:50 GMT

Hi to all,
I´d like to generate a select menu.
First I do an select to db. The result is stored in an vector.
All the values are Strings.
The Values get displayed on the console, but not put into the option-tag.

Here is the code:

---------------------------------------------------------------------------------------------------------------------
<html:select property="swg" size="" value="">

            <%
                  try
                  {

                        Enumeration elem = schluesselForm.getV_swg
().elements();

                        while (elem.hasMoreElements())
                        {
                              schluesselForm.setSwg((String)
elem.nextElement());
                              System.out.println ("Test (70): " +
schluesselForm.getSwg());
            %>
            <html:option value="<% schluesselForm.getSwg(); %>">
            <%
                        schluesselForm.getSwg();
            %>
            </html:option>
            <%
                        } //end while
                  } //end try

                  catch(Exception e)
                  {
                        System.out.println("Fehler in schluessel.jsp (83):
" + e.getMessage());
                  }
                        %>
            </html:select>
-----------------------------------------------------------------------------------------------------------------------

Has anybody an idea why it doesn´t work?

Manuel





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


Mime
View raw message