The BTT presentation engine defines a way of presenting a action conditions on whose evaluation alternate processing routes take place. These routes include:
Struts flows are simplistic in that no condition is evaluated before control is forwarded to the next action. To incorporate these action conditions, the struts configuration file is extended to include declarative conditions definitions. At runtime, the BTTBaseAction senses that there are conditions associated with the current action being executed, delegates the processing of those conditions to the ConditionProcessor which in turn accesses the in-memory condition definitions and evaluates to return an ActionForward causing the application to move to another action of JSP.
An example of the condition definition follows:
<conditions action="/QuitCondition"> <condition name="a" type="com.ibm.btt.struts.sample.conditions.Condition1" onTrue="changeState(quit.d)" onFalse="condition(b)"/> <condition name="b" type=" com.ibm.btt.struts.sample.conditions.Condition2" onTrue="changeState(quit.c)" onFalse=" changeState(quit.e)"/> </conditions>