• 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

ActionForm and introspection

 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
ActionForm is based on introspection and i am wondering how exactly introspection works.

Let's suppose that i have this foo ActionForm class for a JSP that has only one text field that i call "phone":




1) the property "blah" is different from Phone : is that a problem, regarding introspection ?
2) Introspection only checks the getter and setter methods, not the properties (here "blah"), correct ?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your understanding is correct. The Apache Commons BeanUtils that Struts uses assumes that ActionForm follows the JavaBean rules, which includes the fact that all properties are expected to have getters and setters following certain naming conventions. BeanUtils looks only at the getter and setter, not at the instance variable.
 
reply
    Bookmark Topic Watch Topic
  • New Topic