You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by as as <sa...@yahoo.com> on 2004/03/19 14:06:48 UTC
Two beans in same form
Hi
I have two beans - teacher and student in same form and with same variable(property) SSN.
Teacher is a subclass of my studnet (in my design)
error comes as no getter for SSN for bean student ...
javax.servlet.jsp.JspException: No getter method for property employeeID of student
how do i differentiate these two ,.....
Thanks much for help.
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
RE: Two beans in same form
Posted by as as <sa...@yahoo.com>.
Colm,
Thanks for quick reply.
his page has one particular teacher and all students under him.
so the code to display info about teacher is:
<html:form action="teacherEdit" name="teacherDisplayForm" type="com.myProject.TeacherDisplayForm" >
<table border="0" width="100%">
<tr>
<th align="right">
SSN:
</th>
<td align="left">
<input type="hidden" name="SSN"
value="<%= request.getParameter("SSN") %>">
<html:hidden property="SSN" value="<bean:write name="teacher" property="SSN" />"/>
<bean:write name="teacher" property="SSN" />
</td>
</tr>
</table>
<table>
<logic:iterate id="student" name="students">
<tr>
<input type="hidden" name="SSN"
value="<bean:write name="student" property="SSN" />">
<a href="studentDisplay.do?SSN=<bean:write name="student"
property="SSN" />">
<bean:write name="student" property="SSN" />
</a>
</td>
...
The code from <logic:iterate> and below displays the rows of students under that teacher (and displays each students' SSN under it)
Thanks in advance for the help.
Colm Garvey <co...@letsys.com> wrote:
Need to see the code, compadre :)
-----Original Message-----
From: as as [mailto:sam_struts@yahoo.com]
Sent: 19 March 2004 13:07
To: struts-user@jakarta.apache.org
Subject: Two beans in same form
Hi
I have two beans - teacher and student in same form and with same
variable(property) SSN.
Teacher is a subclass of my studnet (in my design)
error comes as no getter for SSN for bean student ...
javax.servlet.jsp.JspException: No getter method for property employeeID of
student
how do i differentiate these two ,.....
Thanks much for help.
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
RE: Two beans in same form
Posted by Colm Garvey <co...@letsys.com>.
Need to see the code, compadre :)
-----Original Message-----
From: as as [mailto:sam_struts@yahoo.com]
Sent: 19 March 2004 13:07
To: struts-user@jakarta.apache.org
Subject: Two beans in same form
Hi
I have two beans - teacher and student in same form and with same
variable(property) SSN.
Teacher is a subclass of my studnet (in my design)
error comes as no getter for SSN for bean student ...
javax.servlet.jsp.JspException: No getter method for property employeeID of
student
how do i differentiate these two ,.....
Thanks much for help.
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org