Ask for help on <xapp:if>

X-Application Version: 3.1.3
Tamino Version : 3.1.1
Platform : Win2k
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

After looking at documentation section “JavaServer Pages Tag Reference”, and it seems to be able to do one conditional checking on the xapp:if

But, if it’s possible to deal with more conditions by using logical operator, AND/OR?

Also, is there any if…then…else capability provided?




[This message was edited by Christian Freytag on 21 Mar 2003 at 12:25.]


To your questions:

(1) Is it possible to deal with more conditions by using logical operator (AND/OR) ?

No, X-Application does currently not provide an expression language for tag attribute.

(2) Is any if…then…else capability provided?

No, the “if tag” has only a plain body without sub-element structure. I think your intention was a JSP tag construct of the following form:

<xapp:if condition="..." ...>
    <!-- body content if the condition is true -->
    <!-- body content if the condition is false -->

What is the current possibility you have to extend the conditional check?

It is possible to define a plugin method for a check. The attribute ‘condition’ of the ‘if tag’ must be a string to name your check. The attribute ‘value’ is the argument passed to your check.

An example is the method ‘isRemoveable’ of the class StandardElementPlugin.

Have a look at the files
(1) xapplication_313\src\com\softwareag\xtools\xapplication\jsp\xapplication-standard.xml,
(2) xapplication_313\src\com\softwareag\xtools\xapplication\plugin\

If you have problems to define a check for you application send a post with a description about your requirements and we will try to support you.


any plans of implementation of this feature?





with the new XPath handling of X-Application 4.1.1 it is possible to add an XPath expression to the select[b] attribute of an [b]xapp:if tag. This XPath expression can contain ‘and’ and ‘or’ operators.


<xapp:if select="/Property[./Price < 250000 and ./Address/State = 'NY']">

The body is evaluated if the price of the current Poperty document is less the defined limit and is in New York.