struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as as <sam_str...@yahoo.com>
Subject Re: html:form
Date Sun, 18 Apr 2004 14:30:05 GMT
Thanks for the reply. I am submitting both the forsm...so does only one submitted form 
 
 
 
end up in the request?
Here is my code briefly:
 
 
 
<html:form action="principalEdit" name="principalForm" type="com.PrincipalForm" >  
<table border="1" width="100%"> 
 <tr bgcolor=#EAEAE5>
    <th align="right">
      ID #:
    </th>
    <td align="left">
    <html-el:hidden property="ID" /> 
    <bean:write name="principal" property="ID" />
    </td>
 </tr>
  </table>
</html:form> 
<html:form action="teachersDisplay" name="teachersForm" type="com.TeachersForm">  
<logic:iterate id="teacher" type="Teacher" name="teachers" property="teacher">
<table>
<tr>
<td align="center">
            <bean:write name="<td align="center">
            <bean:write name="driver" property="last" />
   </td>" property="last" />
   </td>
</tr>
</logic:iterate>
</table>
</html:form> 
</body>
</html>

Christian Bollmeyer <java@christianbollmeyer.de> wrote:
On Saturday 17 April 2004 05:13, as as wrote:
> Hi
>
> Has anyone implemented two html:form in a same jsp..
>
> I wish to do this to implement two tables.each table displaying
> values in a row, of a bean...
>
> so there are two beans...
>
> for some reason, it gives me error saying it cnat find getter for my
> second bean...though I did add getters and setters for all attributes
> in my struts form class.
>
> thanks in advance for the help,
>
> Sam

Hi,

could well be I'm not fully understanding the exact problem again,
but generally, two in a single JSP page are no
problem. The one you submit ends up in the request, and
gets renderered to just a normal HTML form
tag in the end. On to the beans. I'm not sure what kind of
bean you mean here. If it's the form bean (and it's the same
table), try referring to it in your second via
the token you used for the first one. If we're talking about
two different beans here, you have to make sure both of
them are actually there and bear different token names.
In this case, you have to manually create the 'second'
instance and put it in request or whatever scope so that
it can be found.

HTH,
-- Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

		
---------------------------------
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message