:) thanks for pointing that out.. that was a dumb mistake I made while
typing in my question. They are public in the actual class.


-----Original Message-----
From: Karr, David [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 02, 2004 10:39 AM
To: Struts Users Mailing List
Subject: RE: Nested Properties in ActionForms

Your accessors on the Form class are private.  Make them public.

> -----Original Message-----
> From: Apte, Dhanashree (Noblestar) [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 01, 2004 9:26 AM
> To: 'Struts Users Mailing List'
> Subject: Nested Properties in ActionForms
> 
> 
> Hi All,
> 
> I need to know the correct way to display nested properties of a form 
> on my jsp using struts.
> 
> I have an ActionForm of type:
> 
> public class EmployeeInfoForm extends ActionForm {
>       private Name empName;
>       private Name spouseName;
> 
>       private String getFirstName() {
>               return empName.getFirstName();
>       }
> 
>       private void setFirstName(String fn) {
>               empName.setFirstName(fn);
>       }
> }
> 
> and the class Name has the following structure:
> 
> public class Name {
>       private String firstName;
>       private String middleName;
>       private String lastName;
> 
>       public String getFirstName() {
>               return firstName;
>       }
>  
>       public void setFirstName(String fn) {
>               firstName = fn;
>       }
> }
> 
> 
> On the jsp I have:
> <bean:write name="employeeForm" property="firstName"/>
> 
> I get the exception: No getter method for property firstName of bean 
> employeeForm.
> 
> 
> What is the correct way to accomplish what I am trying to do here? Any 
> help appreciated.
> 
> Thanks a lot!
> Dhanashree.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



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

Reply via email to