Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Nested FormBean using DynaActionForm

 
Kalyana Sundaram
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Kalyana Sundaram
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just specify the class for the bean in the type attribute. Example:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic