This section describes the attributes of the struts-layout tags.
Some tag properties can be simple JSTL expressions, like ${beanName.beanProperty}. Those properties are indicated with "[EL]".
Used inside a <layout:form> tag to include struts-layout tags or buttons
Can automatically generate save/reset/cancel or confirm/cancel button if values are specified for the attribute name & property.
Attributes:
| Attribute Name | Description |
|---|---|
| align | Align attribute of the column generated. Default: CENTER |
Render a submit button.
Differs from the one in the html taglib by the addition of an attribute to specify the action value of a DispatchAction. This allows the form to have many submit ot cancel buttons calling different methods of a DispatchAction. The submit button can also been displayed in function of the form display mode.
Additional attribute:
| Attribute Name | Description |
|---|---|
| mode | Mode in which the button must be displayed. Format: "X,Y,Z" where X Y Z can be "D" (display), "N" (not displayed) "C" (Cell, the button is replaced by an empty space) or "F" (frozen, set disabled HTML attribute) in the create, edit and inspect form mode [EL] |
| policy | Name of the display policy to use |
| reqCode | value of the action parameter for the action subclassing DispatchAction |
| selectCode | set the value of the parameter 'selectCode' of the form to the value of the 'selectProperty' property of the bean under the name 'selectName' when the form is submitted. |
| selectName | cf selectcode |
| selectProperty | cf selectCode |
Render a cancel button.
Differs from the one in the html taglib by the addition of an attribute to specify the action value of a DispatchAction. This allows the form to have many submit ot cancel buttons calling different methods of a DispatchAction.
Additional attribute:
| Attribute Name | Description |
|---|---|
| reqCode | value of the action parameter for the action subclassing DispatchAction |
| mode | Mode in which the button must be displayed. Format: "X,Y,Z" where X Y Z can be "D" (display), "N" (not displayed) "C" (Cell, the button is replaced by an empty space) or "F" (frozen, set disabled HTML attribute) in the create, edit and inspect form mode [EL] |
| policy | Button display policy |
Render a reset button.
Additional attribute:
| Attribute Name | Description |
|---|---|
| mode | Mode in which the button must be displayed. Format: "X,Y,Z" where X Y Z can be "D" (display), "N" (not displayed) "C" (Cell, the button is replaced by an empty space) or "F" (frozen, set disabled HTML attribute) in the create, edit and inspect form mode [EL] |
| policy | Button display policy |
Render an image button.
Differs from the one in the html taglib by the addition of an attribute to specify the action value of a DispatchAction. This allows to have many submit ot cancel buttons calling different methods of a DispatchAction.
Additional attribute:
| Attribute Name | Description |
|---|---|
| mode | Mode in which the button must be displayed. Format: "X,Y,Z" where X Y Z can be "D" (display), "N" (not displayed) "C" (Cell, the button is replaced by an empty space) or "F" (frozen, set disabled HTML attribute) in the create, edit and inspect form mode [EL] |
| name | Name of the image in the struts-layout image directory |
| policy | Button display policy |
| reqCode | value of the action parameter for the action subclassing DispatchAction |
Render a button
Attributes:
| Attribute Name | Description |
|---|---|
| accesskey | - |
| mode | Mode in which the button must be displayed. Format: "X,Y,Z" where X Y Z can be "D" (display), "N" (not displayed) "C" (Cell, the button is replaced by an empty space) or "F" (frozen, set disabled HTML attribute) in the create, edit and inspect form mode [EL] |
| onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup | - |
| policy | Button display policy to use |
| property | - |
| reqCode | value of the action parameter for the action subclassing DispatchAction |
| style | - |
| styleClass | - |
| tabindex | - |
| valign | - |
| value | - |
Modified <bean:write> which allows a field to be formatted with the displayed value. The tag can be nested in a layout tag (panel, form frid etc.)
Attributes:
| Attribute Name | Description |
|---|---|
| filter | Filter sensitive HTML characters (default : true) |
| layout | if set to false, do not surround the value with html layout code(<th>). |
| name | As in <bean:write> [EL] |
| property | As in <bean:write> [EL] |
| type | Format type |
| style | css style to use to display the value |
| styleClass | css style class to use to display the value |
Modified <bean:message> tag that can be nested in a layout tag (panel, form, grid etc.)
Additional Attributes:
| Attribute Name | Description |
|---|---|
| styleClass | css style to use to display the message |
Modified <html:link> tag that can be nested in a layout tag (panel, form, grid etc.). The tag also generates the required javascript code if struts-layout is configured to warn when the user clicks on a link and have unsaved form changes.
| Attribute Name | Description |
|---|---|
| action | Link action |
| href | Link href [EL] |
| layout | If set to false, do not generate layout code |
| mode | Link display mode |
| policy | Link display policy |
| scheme | Generate an absolute URL with the specified scheme (http/https) [EL] |
| title | The advisory title for this hyperlink. |
| titleKey | The message resources key for the advisory title for this element. |
Insert a link to the stylesheet set by LayoutUtils.setSkin(...). If no skin has been set, the default skin specified in Struts-Layout.properties is used.
| Attribute Name | Description |
|---|---|
| includeScript | If set to true, include the struts-layout javascript files |
Include the body of the tag only if the current form display mode matches one indicating in the value attribute.
| Attribute Name | Description |
|---|---|
| value | comma separated list of allowed mode. Ex "create,edit" or only "inspect" |
Deprecated. Render the selected properties of each member of a collection, using one panel per member. Attributes are the same as for the collection tag.
The table tag displays each item of a collection in a table whose number of columns is fixed by the developer.
| Attribute Name | Description |
|---|---|
| name | Name of a bean in the context containing the collection |
| property | If the bean is not the collection itselft, name of property which will give the collection |
| id | Name to use to expose the beans in the collection |
| indexId | Name to use to expose the iteration index |
| col | The number of columns of the table |
| width | The width of the table |
| align | The alignment of the table |
Render the following Html tags: <html>, <head>, <title>, <base> and <body>. The tag includes the struts-layout javascript files and the css file. See LayoutUtils.setSkin(HttpSession, String) to change the css file to use. If this tag is not used, the <layout:skin> tag must be used to include the javascript and the css.
The following tags can be put in the body of this tag: form, collection, news
Additional attributes:
| Attribute Name | Description |
|---|---|
| align | content align (default : center) |
| key | Key of the message to use as the page title |
| layout | generate html layout code (default: true) |
| onload | body onload event handler |
| styleClass | css class to use to display this page |
The following servlet context attribute can be set: