Hello,

My previous use of Struts was on a very very simple application and I was
able to do well with it. But now I am have a more complex model which I am
not being able to get around with as I have to build a html form whose
property maps to the attribute of an attribute of the ActionForm. My doubt
relies on how to access this "sub-attribute" on teh html form?

In case this is not to clear, I have the following, very unreal scenario:

package sample;

import java.util.*;
import org.apache.actions.*;

public class Father extends ActionForm{

      private String name;
      private Child onlyChild;

     //....Getters and setters....//
}


---------------------------------------------------------

package sample;

import java.util.*;
import org.apache.actions.*;

public class Child extends ActionForm{

       private String name;
       private int age;

       //...Getters and setters...//
}


------------------------------------------------------------


page.jsp

(...)


<html:form action="fatherAction">
      Name: <html:text property="name"/><br/>
      <b>Child details</b><br/>
      Only child name: <html:text
property="onlyChild.name"/><!--????????--><br/>
      Only child age: <html:text
property="onlyChild.age"/><!----????????????--->
</html:form>

(...)


---------------------------------------------------------------------------


When I try it like the example above I get error as it the
onlyChild.whatever does not exist, does no map to a known attribute it is
null.... Please let me know how to achieve that... Your help is much
appreciated...

Merry Xmas in advance!!!

-- 
Thank you,
TS
+55 21 7524-9415

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to