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

Reply via email to