struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hans albers" <>
Subject Where to put the code for filling an ArrayList
Date Mon, 03 Jun 2002 06:56:03 GMT
Hi there

I want a dropdown-box filled by a bean.

I fill the Arrraylist inside the jsp as you can see, but I don't
want to have this code in the jsp because the data later comes
from a database.
Where and how do I have to write this code (a...b) for the list be
accessed by the show.jsp?
In the or or in the of the
page before the show.jsp?

In my show.jsp:
<% //a
  java.util.ArrayList list = new java.util.ArrayList();
  list.add(new LabelValueBean("Art1", "a1"));
  list.add(new LabelValueBean("Art2", "a2"));
  list.add(new LabelValueBean("Art3", "a3"));
  // b

  <html:select property="value">
        <html:options collection="list" property="value"

Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message