Thank you so much Justyna.  I can understand it but in a paralell topic 
about JSTL it is said that the reason for using tags is to make it easier 
for web page designers.  However I don't know any designers who would not be 
intimidated by this code. It looks like tags are still putting a lot of code 
into the page.

>   <c:forEach var="row" items="${resultSet.rowsByIndex}">
>     <jsp:useBean id="mybean" class="mybean" scope="request"/>
>        <jsp:setProperty name="mybean" property="nameId"
>value="<%=row[0]%>"/>
>        <jsp:setProperty name="mybean" property="name" 
>value="<%=row[1]%>"/>
>   </c:forEach>

Thank you again, Soefara.

>----- Original Message -----
>From: "Soefara Redzuan" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, March 11, 2002 6:06 AM
>Subject: can output of dbtags query be used to fill javabean properties ?
>
>
> > Sorry I have another question. I have a form that sets the default 
>values
>of
> > the fields with a javabean like this
> >
> > <jsp:useBean id="mybean" class="mybean" scope="request">
> >
> > <form>
> > First name is <input type="text" name="firstname"
> > value="<%=mybean.getFirstname()%>">
> >
> > Last name is <input type="text" name="lastname"
> > value="<%=mybean.getLastname()%>">
> > </form>
> >
> > This fills default field values if the parameters are submitted in the
> > request otherwise it makes the fields blank "".
> >
> > But how can I set the values of the bean properties from the SQL result
> > returned from the dbtags query ?
> >
> > For example I would like to loop through the results of a sql:query and
>set
> > or create a javabean each time.
> >
> > <sql:statement id="stmt1" conn="conn1">
> >   <sql:query>
> >     select * from members
> >   </sql:query>
> >   <%-- loop through the rows and create a bean each time --%>
> >   <jsp:useBean id="resultbean" class="mybean">
> >   <sql:resultSet id="rset2">
> >     First name is <input type="text" name="firstname"
> > value="<%=resultbean.getFirstname()%>">
> >     Last name is <input type="text" name="lastname"
> > value="<%=resultbean.getLastname()%>">
> >   </sql:resultSet>
> > </sql:statement>
> >
> > Is something like this possible ?
> >
> > Thank you, Soefara
> >
> > _________________________________________________________________
> > MSN Photos is the easiest way to share and print your photos:
> > http://photos.msn.com/support/worldwide.aspx
> >
> >
> > --
> > 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]>
>


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

Reply via email to