• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to write dynaactionform

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Could you give me idea, how to create dynaActionForm for dynamic fields (in a JSP page).
Thanks n advance
Cheers
Viswanath
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the config file, you need to have:


In the form, you wont have the getters and setters for those fields f1, f2, ..., fn because they are dynamic fields.

If you need to access them, you could either use:
Method 1 (in the dynaform)


Method 2 (NOT in the dynaform, say in Action Dispatcher)


In JSP, we dont use the dynaform, instead, we create our own view bean and put those dyna form values there and display out to JSP using Struts Taglib. Thus, when they are submitted, they appear in the form.

Hope this help.

Nick
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic