Child pages
  • Describing a bean in velocity
Skip to end of metadata
Go to start of metadata

The follow snippet might be useful during debugging to list the properties inside an
arbitary bean. Or for handing to a UI developer that use unaware of the getters/setters inside an object.

i.e. assuming $obj is a PersonObject that has properties(firstName, lastName, and zip).

would print

One might also expand upon this to build a dynamic interface with via reflection. e.g.

  • No labels

2 Comments

  1. Anonymous

    sample needs to be updated.
    replace $webwork with $struts