|
Definition of Whitebeam XML Tags
|
rb:testThis attribute can be placed on any tag in a Presentation Page. When a page is precessed
the Whitebeam engine will tage the value of the attribute and run it through the JavaScript
engine. The result is taken as a boolean. If the expression is evaluates to 'true'
then the engine will execute (generate output from) the tag that contains the attribute. If
the expression evaluates to 'false' then no output is produced by this tag or any of its
decendents. This is a new addition to the Whitebeam XML markup language and in many common situations
can reduce the complexity of Presentation Pages.
<rb:script>
var sessionData = rb.page.session.read();
</rb:script>
<div rb:test="!sessionData.loggedIn">
<form action="login.rhtm" method="post">
<input type="text" name="username" size="20"><br>
<input type="password" name="password" size="20"><br>
<input type="submit" name="login" value="Login">
</form>
</div>
In this very simple example, the login form is *only* displayed if there is currently no one logged in. Note this assumes that the login code
sets a flag (sessionData.loggedIn) |
|
(loadtime : 14ms) |