Shawn,

Hi.  I have just posted a reply to earlier note which should cover this too, and
provides an example.  I also posted some full example code in an earlier post:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html

Note, this uses indexed attribute in the nightly builds to update the vector -
you don't need it if  you just want to display stuff.

Re: select, just set up a collection in your action and add it to the form bean.
Then use this with a form tag.  For example, I add a collection called
possibleSeverities to my form bean, and have a currentSeverity which is a
string.  The severities are displayed, and the one selected is set in
currentSeverity when the form is submitted.  Here's the snippet:

      <html:select property="currentSeverity" size="4">
         <html:options property="possibleSeverities"/>
      </html:select><P>

HTH,

Cheers,

Dave






Shawn Sohl <[EMAIL PROTECTED]> on 10/05/2001 12:04:52 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
      <[EMAIL PROTECTED]>
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  Iterate/Select Tags




>
> I have searched for example on how to use these tags and I have come up
> empty.  Can some one point to some great documentation
> with real world examples on how to use these tags.
>
> If not here is my scenario.  I am passing a Vector to a JSP page and
inside
> that vector is a number of beans.  So this code
> is not working
>
> <jsp:useBean id="testlist" class="java.util.Vector" scope="request" />
>
> <logic:iterate id="test" collection="<%=testlist%>">
>                 <tr>
>                    <td>Job</td>
>                    <td><bean:write name="test" property="txtJob" /> </td>
>                    <td>Job Title</td>
>                    <td><bean:write name="test" property="txtJobTitle" />
> </td>
>         </logic:iterate>
>
> One question is how does the iterate tag know which bean to use.  Dont I
> have to define a bean object that states the type
> of bean that is inside of the vector.
>
> In regards to "Select/Options" tags, I need all kinds of help.  I need to
> know everything from setting up my Form objects to
> using the "Select" tag to loop through a vector of bean objects and
populate
> the values............
>
> Please Help!


This e-mail and any files transmitted with it are confidential and are intended
solely for the use of the individual or entity to whom they are addressed. If
you are NOT the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, be advised that you have received this e-mail
in error and that any use, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited.







Reply via email to