Main Menu
Lecture 1
Lecture 2
Lecture 3
Lecture 5
Lecture 6
Lecture 7
 

 

 

WOConditionals

WOConditionals allow you to hide and show parts of your HTML. They are bound to either a boolean or a method that returns a boolean. Depending on the state of this boolean the HTML inside the borders of the WOConditional is either displayed or hidden. Generally if the boolean is true then the HTML is shown. If its false then its hidden. But you can swap this around so that the HTML is shown if the boolean is flase and hidden if its true.
Clicking on the + sign of a WOCondtional will change it so that it shows a -.

A + means that if the value of the boolean bound to the WOConditional equates to TRUE then that section of the HTML will be shown.

A - means that if the value of the boolean bound to the WOConditional equates to FALSE then that section of the HTML will be shown.


Be careful to make sure your booleans are set correctly when the page is first loaded so that the correct elements are shown. One way of doing this is to do this set their values inside the constructor.

Lect 4 Demo 3 ( Download )