Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynmic Getter and Setter Methods?

 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Struts Experts,

I have one Question,
My Aim is to create the Custom Fields using Struts.
My Question Is : Is it possible to create Run Time Getter and Setter
Methods.

Please Send Your Suggestions.

Thanks
A.Edward Durai
 
Pawan Rao
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this can be done. You have to improve the proxy package, we can create the new class at runtime.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use org.apache.struts.validator.LazyValidatorForm as your ActionForm bean. This class automatically gets and sets whatever property you put in an <html:xxx> tag. Fields do not have to be predefined in any way.
[ July 22, 2006: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic