Like trEvenOdd, but highlights row as user hovers.
The following parameters are recognized:
The heading to put in the left column.
The data to be displayed in right column.
Optional attributes for the header column (<td> entity).
Optional attributes for the right column (<td> entity).
This macro is very handy when building tables which have two columns. The first column is treated as a label column, the second column is used for displaying the data. This is primarily used for building output tables where you want the row under the mouse to be highlighted, but alternating colors of table rows.
Example of using the macro:
<table @htmlAttr("class","labeledRow") @htmlAttr("summary","Two Columns")> @trEvenOddH("Date","@now()") @trEvenOddH("Name","George") @trEvenOddH("Age","34",,"@htmlAttr("align","right")") </table>
Assuming the com.ccg.macros.at.All
class is within your CLASSPATH
and the
config/html.at
macros file has been
generated (Hint: run make atmacros in the
wui
directory), a developer should be able to
run the above example by copy/pasting from below:
[root@probe root]#
java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")
<table @htmlAttr("class","labeledRow") @htmlAttr("summary","Two Columns")> @trEvenOddH("Date","@now()") @trEvenOddH("Name","George") @trEvenOddH("Age","34",,"@htmlAttr("align","right")") </table>
EOF
This macro is defined as:
<tr @htmlAttr("onmouseover","enterRow(this);") @htmlAttr("onmouseout","exitRow(this);")@tdEvenOddToggle()@thEvenOddToggle()> @thEvenOdd("@param(0)","@param(2)") @tdEvenOdd("@param(1)","@param(3)") </tr>