|
Rules Guide |
This chapter describes how to use the JSP tags contained in RuleTag.jar.
For background information, see the chapter on using the Director tag libraries in the Core Development Guide.
Fires a Director action and returns the response phrase.
This tag wraps the doAction() method on the EbiAction interface and the getResponsePhrase() method on the EbiContext interface.
<prefix:doAction action="action" id="ID" />
This example shows how to use the doAction tag to insert an action's response phrase at the tag location:
<% taglib uri="/re" prefix="re" %>
...
Result of Action is...
<re:doAction action="com.sssw.re.action.ReturnAsHtmlBold" />
This example shows how to use the doAction tag to store an action's response phrase in a variable for further processing:
<% taglib uri="/re" prefix="re" %>
...
<re:doAction action="com.sssw.re.action.ReturnAsHtmlBold" id="results"/>
...
The response phrase is: <%=pageContext.getAttribute("results")%>
Fires a Director condition and returns a string that represents the Boolean value returned by the condition.
This tag wraps the doCondition() method on the EbiCondition interface.
<prefix:doCondition condition="condition" id="ID" />
This example shows how to use the doCondition tag to insert a condition's result at the tag location:
<% taglib uri="/re" prefix="re" %>
...
Result of condition is ...
<re:doCondition condition="com.sssw.re.condition.CheckDate" />
This example shows how to use the doCondition tag to store an action's response phrase in a variable for further processing:
<% taglib uri="/re" prefix="re" %>
...
<re:doCondition condition="com.sssw.re.condition.CheckDate" id="result"/>
...
The result is: <%=pageContext.getAttribute("result")%>
Fires a Director rule that returns a true or false result.
This tag wraps the isTrue() method on the EbiRuleManager interface.
<prefix:conditionalRule rule="rule" owner="owner" id="ID" />
<% taglib uri="/re" prefix="re" %>
...
<re:conditionalRule rule="sample.bonus" id="rule1"/></p>
<%=pageContext.getAttribute("rule1")%>
Fires a Director rule and returns the response phrase.
This tag wraps the fireRule() method on the EbiRuleManager interface and the getResponsePhrase() method on the EbiContext interface.
<prefix:fireRule rule="rule" owner="owner" id="ID" />
This example shows how to use the fireRule tag to insert a rule's response phrase at the tag location:
<% taglib uri="/re" prefix="re" %>
...
<re:fireRule rule="myrule" />
This example shows how to use the fireRule tag to store a rule's response phrase in a variable for further processing:
<% taglib uri="/re" prefix="re" %>
...
<re:fireRule rule="myrule" id="results"/>
...
The response phrase is: <%=pageContext.getAttribute("results")%>
|
Rules Guide |
Copyright © 2002, SilverStream Software, LLC, a wholly owned subsidiary of Novell, Inc. All rights reserved.