Search from Struts2 Library

Sunday, September 21, 2008

Property tag

The property tag provides a quick, convenient way of writing a property into the rendering HTML. Typically, these properties will be on the ValueStack or on some other object in the ActionContext. As these properties can be of any Java type, they must be converted to strings for rendering in the result page. This conversion is handled by the framework’s type converters, which we covered in chapter 5. If a specific type has no converter, it’ll typically be treated as a string. In these cases, a sensible toString() method should be exposed on the class. Table below summarizes the most important attributes.

No comments: