struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Developer Developer" <devquesti...@gmail.com>
Subject Re: Beginner's question on Struts and JSP
Date Fri, 21 Apr 2006 19:13:37 GMT
Harsh and Ted,
Thanks for the information  Here is one more question. I am able to create
an ActionForm with a collection type attribute in it ( Vector) and also
i could link it to the table in the JSP.  I am getting an error "No getter
method for property vSectors of bean sectorData". Do you know what i must
have done wrong ? the actionForm has getter and setter for a variable
named  Vector vSectors in the actionform SectorData.

Another question is- First time when the JSP comes up i want the formbean to
display values from the database. Where do i initialize the form bean to
read data from database?

Thanks !




<TABLE>

<TBODY>

<logic:iterate id="vSectors_id" name="sectorData"

property="vSectors" indexId="index">

<TR>

<TD><html:text name="sectorData"

property='<%= "vSectors[" + index + "]" %>' /></TD>

</TR>

</logic:iterate>

</TBODY>

</TABLE>




On 4/21/06, Chaudhary, Harsh <HCHAUDHA@amfam.com> wrote:
> Another resource I found to be very helpful is:
> http://struts.apache.org/struts-action/userGuide/index.html
>
> Harsh.
>
> -----Original Message-----
> From: Ted Husted [mailto:ted.husted@gmail.com]
> Sent: Friday, April 21, 2006 10:55 AM
> To: Struts Users Mailing List
> Subject: Re: Beginner's question on Struts and JSP
>
>
> The best thing might be to start by going through the MailReader
> application that is bundled with the distribution. It does things like
> populate a table from a database, and covers several other use cases
> you will run into.
>
> Also be sure to review the latest FAQs on the website, to be sure you
> get started "on the right foot".
>
> * http://struts.apache.org/faqs.html
>
> HTH, Ted.
>
> On 4/21/06, Developer Developer <devquestions@gmail.com> wrote:
> > Hello,
> >
> > I need to  create a  Table  in JSP with values coming from the
> database. I
> > want to use struts frame work for this application.
> >
> > Here is my question
> >
> > How should I design a formbean and link it to the view (JSP) ? Sample
> view
> > code would be very helpful.  I think I need to have a collection type
> in the
> > form bean to store the values from the database and some how link to
> the the
> > table in the JSP ( but don;t know how to do it)
> >
> > Thanks !
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message