• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ActionForm and introspection

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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 ?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic