Rules Guide
CHAPTER 9
This chapter describes the JSP tags contained in RuleTag.jar:
For background information, see the chapter on using the exteNd Director tag libraries in Developing exteNd Director Applications.
Description
Fires an exteNd 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.
Syntax
<prefix:doAction action="action" id="ID" />
Examples
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")%>
Description
Fires an exteNd 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.
Syntax
<prefix:doCondition condition="condition" id="ID" />
Examples
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")%>
Description
Fires an exteNd Director rule that returns a true or false result.
This tag wraps the isTrue() method on the EbiRuleManager interface.
Syntax
<prefix:conditionalRule rule="rule" owner="owner" id="ID" />
Example
<% taglib uri="/re" prefix="re" %>
...
<re:conditionalRule rule="sample.bonus" id="rule1"/></p>
<%=pageContext.getAttribute("rule1")%>
Description
Fires an exteNd 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.
Syntax
<prefix:fireRule rule="rule" owner="owner" id="ID" />
Examples
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")%>
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...