• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DynamicActionForm in Struts2

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using Struts2.0.9.
Is there any option to use Dynamic beans in this?
My aim is ..When I change the database table structure, I dont want to redo the java class. I want to change the configuration file.
if you have any idea please share with me.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"roseline", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are disabled.

bear
JavaRanch Sheriff
[ September 10, 2007: Message edited by: Bear Bibeault ]
 
roseline ruba
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the information.
i want to use Dynamic Beans in Struts2.0.9
how can i achieve this?
My aim is ..when i change the database table structure , i dont want to change the java class, instead i want to change the configuration file(xml file) as in struts1.
how can I achieve this is struts2.0.9.?
Please share your ideas..Thanks.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DynaBeans are not part of the Struts 2 Framework. I personally never liked them, and am not sorry to see them go. It's at least a much work to define a DynaBean in XML as it is to write a regular JavaBean, and maintaining the XML isn't really any easier either.

If you really like DynaBeans and want to use them in Struts 2, you will need to use the Struts 1 plugin classes found in struts2-struts1-plugin-2.0.9.jar. In particular there is a class called DynaBeanPropertyAccessor that might be useful to you. Here is a link to the API.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic