Search from Struts2 Library

Monday, September 22, 2008

Param tag

The last tag we’ll discuss has already been used throughout this chapter. The param tag does nothing by itself, but at the same time it’s one of the more important tags. It not only serves an important role in using many of the tags covered in this chapter, it’ll also play a role in many of the UI component tags, Table below lists the attributes you’re now familiar with.

Using the param tag has already been established in this chapter. In particular, our coverage of the bean tag showed a couple of use cases for the param tag, including as a means for passing parameters into your own custom utility objects. As long as you have the general idea, it’s just a matter of perusing the APIs to see which tags can take parameters. Toward this end, it’s always a good idea to consult the online documentation of the Struts 2 tags to see if a given tag can take a parameter of some sort.

No comments: