Class wobzilla_variableHandler

Object
   |
   +--wobzilla_variableHandler

class wobzilla_variableHandler

A Variable-Handler can automate variable-handling in container-elements. It stores the variable values into an context-object. Assume the following Configuration:

  <variable name="books">
   <for-each select="author/books">
    <value-of select="@name">;
   </for-each>
  </variable>
  <variable name="count" select="count(author/books)"/>
  <variable name="book-writer" select="$count > 0"/>
The context will hold the following values after initialization of the variables:


 
Method Summary
 function init(modelNode,outputContext)
           initialize Variables and writes the values into the ouputContext.
 function requery(changes)
           updates variable-contents and writes the updated values into the ouputContext.
 function validate(changes)
           updates all variables that are configured with evaluate="onvalidate".

Method Detail

init

function init(modelNode,outputContext)
initialize Variables and writes the values into the ouputContext.



requery

function requery(changes)
updates variable-contents and writes the updated values into the ouputContext.

Returns:
true if any variable has changed.


validate

function validate(changes)
updates all variables that are configured with evaluate="onvalidate". After that it converts the contents of all validate-variables (variables with validation="true") to boolean and test if the values are all true.

Returns:
true if validation was successfull for all validate-variable.