I just recompile all codes. I think I didn't recompile one java code.

---------------------------------------------------------------------------
Henry Lu
MCIT                                            phone: (734) 936-2063
University of Michigan Medical Center           fax:   (734) 763-4372

On Tue, 19 Feb 2002, Jerome Josephraj wrote:

> Henry,
>       I do have the same problem. Could you please post the solution.
>
> TIA,
>
> Jerome.
>
> -----Original Message-----
> From: Henry Lu [mailto:[EMAIL PROTECTED]]
> Sent: 19 February 2002 14:37
> To: Struts Users Mailing List
> Subject: Re: <logic:iterate> tag
>
>
> Thanks all. I figured out.
>
>
> ------------------------------------------------------------------------
> ---
> Henry Lu
> MCIT                                            phone: (734) 936-2063
> University of Michigan Medical Center           fax:   (734) 763-4372
>
> On Tue, 19 Feb 2002, Keith wrote:
>
> > Could I suggest you slow down & do some study & experimentation?
> Struts is hard
> > work in the early stages, but you have to go thru it.
> > >From a very quick look one thing is your ArrayList needs to contain a
> class
> > that has get/set methods for it's properties. You've set them like
> >       m.id="123";
> >       m.name="John";
> > when it should be
> > m.setId("123"); & struts will call
> > the String getId() methoid to get the value to display.
> >
> > Also in the iterate tag's type=... you must specify the type of the
> object in
> > each elemnt of your ArrayList ie/ type="MyClass".
> >
> >
> > --- Henry Lu <[EMAIL PROTECTED]> wrote:
> > > I don't remember the error exactly but something like Servlet
> errors.
> > >
> > >
> > >
> ------------------------------------------------------------------------
> ---
> > > Henry Lu
> > > MCIT                                            phone: (734)
> 936-2063
> > > University of Michigan Medical Center           fax:   (734)
> 763-4372
> > >
> > > On 19 Feb 2002 [EMAIL PROTECTED] wrote:
> > >
> > > > Can you give me a little more info about the error ??
> > > >
> > > > On Tue, 19 Feb 2002 08:30:40 -0500 (EST) Henry Lu <[EMAIL PROTECTED]>
> wrote:
> > > > >Could someone tell me why the following code doesn't work? How to
> make it
> > > > >work?
> > > >
> > >
> >///////////////////////////////////////////////////////////////////////
> /////
> > > > >public class MyClass_1
> > > > >{
> > > > >...
> > > > >}
> > > > >///////////////////////////////////////////////////
> > > > >public class MyClass_2 extends MyClass_1
> > > > >{
> > > > >   ...
> > > > >   public ArrayList runList()
> > > > >   {
> > > > >      Arraylist lst = new ArrayList();
> > > > >      MyClass m;
> > > > >
> > > > >      m.id="123";
> > > > >      m.name="John";
> > > > >      lst.add(m);
> > > > >
> > > > >      return lst;
> > > > >   }
> > > > >}
> > > > >///////////////////////////////////////////////////
> > > > >public class MyForm extends ActionForm
> > > > >(
> > > > >   ...
> > > > >   private ArrayList lst;
> > > > >   public ArrayList getLst()
> > > > >   {
> > > > >      MyClass_2 m2;
> > > > >      this.lst = m2.runList();
> > > > >      return this.lst;
> > > > >   }
> > > > >   public void setLst(ArrayList lst)
> > > > >   {
> > > > >      this.lst = lst;
> > > > >   }
> > > > >}
> > > > >//////////////////////////////////////////////////////////////
> > > > ><table>
> > > > >
> > > > ><logic:iterate id="theList"
> > > > >                   name="MyForm" property="lst"
> > > > >               type="MyClass_2">
> > > > ><tr><td>
> > > > ><bean:write name="theList" property="id"/>
> > > > ></td><td>
> > > > ><bean:write name="theList" property="name"/>
> > > > ></td></tr>
> > > > >
> > > > ></logic:iterate>
> > > > >
> > > > ></table>
> > > > >////////////////////////////////////////////////////////////////
> > > > >
> > > > >
> > > >
> > >
> >-----------------------------------------------------------------------
> ----
> > > > >Henry Lu
> > > > >MCIT                                            phone: (734)
> 936-2063
> > > > >University of Michigan Medical Center           fax:   (734)
> 763-4372
> > > > >
> > > > >
> > > > >--
> > > > >To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > >For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Get your firstname@lastname email at http://Nameplanet.com/?su
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Sports - Coverage of the 2002 Olympic Games
> > http://sports.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>   _____
>
> This message contains confidential information and is intended only for
> the individual named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system. E-mail transmission cannot be
> guaranteed to be secure or error-free as information could be
> intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
> contain viruses. The sender therefore does not accept liability for any
> errors or omissions in the contents of this message, which arise as a
> result of e-mail transmission. If verification is required please
> request a hard-copy version.
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>


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

Reply via email to