THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
## prints out the property names for a bean #macro (describeBean $name) #set($bu = $webwork$struts.bean("com.opensymphony.util.BeanUtils")) #foreach($propName in $bu.getPropertyNames($name)) <li>$propName</li> #end #end |
...
Code Block |
---|
#describeBean($obj) |
would print
Code Block | ||||
---|---|---|---|---|
| ||||
<li>firstName</li> |
...
<li>lastName</li> |
...
<li>zip</li> |
One might also expand upon this to build a dynamic interface with via reflection. e.g.
...