File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Creating Nested FormBean  using DynaActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Creating Nested FormBean  using DynaActionForm" Watch "Creating Nested FormBean  using DynaActionForm" New topic
Author

Creating Nested FormBean using DynaActionForm

Kalyana Sundaram
Ranch Hand

Joined: Mar 18, 2005
Posts: 94
1) Can I give my application specific Class in the "type" attribute of <form-property> tag in DynaActionForm?
2) How to Create Nested FormBean using DynaActionForm?

Thanks in Advance!


Only those who will risk going too far can possibly find out how far one can go !!!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Originally posted by Kalyana Sundaram:
1) Can I give my application specific Class in the "type" attribute of <form-property> tag in DynaActionForm?

Yes, you can.
Originally posted by Kalyana Sundaram:
2) How to Create Nested FormBean using DynaActionForm?

Just use "dot notation". For example, if the nested bean is a bean named "user" with an attribute of "firstName", you could write the following:

[ September 23, 2007: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Kalyana Sundaram
Ranch Hand

Joined: Mar 18, 2005
Posts: 94
Well Merrill, Thanks for the reply. That explains me of how to use beans with nested properties in a JSP.

I am wondering, how FormBeans with nested properties can be declared as a DynaActionForm in struts-config.xml!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just specify the class for the bean in the type attribute. Example:
 
Consider Paul's rocket mass heater.
 
subject: Creating Nested FormBean using DynaActionForm