Definition of Whitebeam XML Tags

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
    authenticate
    block
    cachecontrol
    eval
    false
    header
    include
    insertblock
    insertdebug
    macrotag
    marksession
    nomacro
    noscript
    parser
    redirect
    repeatfor
    return
    script
    if
    test
    true
    xmp
    eval
    id
    marksession
    test
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Definition of Whitebeam XML Tags

rb:test

This 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)

Whitebeam release 1.3.36
(loadtime : 20ms)