Inserts table header using even/odd alternating style.
The following parameters are recognized:
The text to be displayed in cell.
Optional attributes for the <th> entity created.
Example of using the macro:
@thEvenOddToggle() <tr> @thEvenOdd("Min Temp") @tdEvenOdd("45.2","@htmlAttr("align","right")") </tr> @thEvenOddToggle() <tr> @thEvenOdd("Max Temp") @thEvenOdd("47.6","@htmlAttr("align","right")") </tr>
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")
@thEvenOddToggle() <tr> @thEvenOdd("Min Temp") @tdEvenOdd("45.2","@htmlAttr("align","right")") </tr> @thEvenOddToggle() <tr> @thEvenOdd("Max Temp") @thEvenOdd("47.6","@htmlAttr("align","right")") </tr>
EOF
This macro is defined as:
<th@ifEqual("@param(1)",,"@htmlAttr("align","left")","@param(1)")@htmlAttr("class","@thEvenOddState()")>@param(0)</th>