struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <nicolas.del...@cgey.com>
Subject Re: NewBie:Populating objects in Jsp
Date Fri, 04 Jul 2003 07:04:17 GMT
Yeah, I get the first point !

Are you ready for the next question ?

Nico.

> Nicolas obviously types quicker then me :-)
> 
> Steve
> 
> > -----Original Message-----
> > From: Nicolas De Loof [mailto:nicolas.deloof@cgey.com]
> > Sent: July 3, 2003 11:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: NewBie:Populating objects in Jsp
> > 
> > 
> > 1.
> > <logic:iterate> type attribute is uses to set the java type of a 
> > JSP variable set by the tag for current item. By
> > default type is java.lang.Object, and if you don't use scriptlets 
> > (<% java %>) or Runtime Expression (<%= java %>) you
> > don't need to use it.
> > 
> > In the case you want to use type attribute, JSP has to import 
> > type declaration using a JSP directive <% @page
> > import="...." %>.
> > 
> > In your case, I don't think PUPIL_LIST items are APFM01Action instances.
> > 
> > 2.
> > id attribute is used to set the name of a JSP variable and a page 
> > scoped bean for the current item. In your case, it
> > should be a "pupil", not a "pupilList".
> > 
> > 
> > 
> > Nico.
> > 
> > > The APFM02.jsp code is as follows :-
> > >
> > > <logic:iterate id="pupilList" name= "PUPIL_LIST" type="APFM01Action">
> > > <tr align="left">
> > > <td>
> > >  <bean:write name="pupilList" property="upn" />
> > > </td>
> > > <td>
> > >
> > > and the Struts-config file is as follows :-
> > >
> > > <form-bean      name="APFM01Form"
> > >                     type="APFM01Form"/>
> > >  <form-bean      name="APFM02Form"
> > >                     type="APFM02Form"/>
> > >   </form-beans>
> > >
> > >   <!-- ========== Action Mapping Definitions 
> > ============================== -->
> > >   <action-mappings>
> > >     <action    path="/APFM01"
> > >                type="APFM01Action"
> > >       name="APFM01Form"
> > >       input="/APFM01.jsp"
> > >       scope="session">
> > >    <forward        name="success" path="/APFM02.jsp"/>
> > >       <forward        name="failure" path="/APFM01.jsp"/>
> > >  </action>
> > >   <action    path="/APFM02"
> > >                type="APFM02Action"
> > >       name="APFM02Form"
> > >       scope="request">
> > >  </action>
> > >
> > > Thanks
> > > Sushil
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > SBC Yahoo! DSL - Now only $29.95 per month!
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
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