Hello,
I checked the code as well as the source code of X-Application. The result is that for the attribute ‘value’ the variable resolving mechanism is not invoked. This is not a bug. The intention when we introduced the variables handling to provide this feature only within the query context (=> xapp:action and xapp:directcommand tag).
However, the plugin mechanism of X-Application should allow you to modify the behavior. I send you two code snippets:
(1) For the file xapplication.xml to define the plug-ins ‘equal’ and ‘notequal’
(2) For a Java class you can compile into the WEB-INF/classes directory of your application (perhaps you should use another package name and class name).
After this, the attribute ‘value’ should be resolved.
Bye
Christian.
xapplication.xml:
<xapplication>
...
<plugins>
...
<node>
<action name="equal"
method=" myapplication.mysubpackage.mysubsubpackage.MyNodePlugin.equal">
<arg>arg</arg>
<arg>variables</arg>
</action>
<action name="notequal"
method=" myapplication.mysubpackage.mysubsubpackage.MyNodePlugin.notEqual">
<arg>arg</arg>
<arg>variables</arg>
</action>
...
</node>
</pre><BR><BR><B>Java class implementing the plug-ins</B><BR><pre class="ip-ubbcode-code-pre">
package myapplication.mysubpackage.mysubsubpackage;
import com.softwareag.xtools.xapplication.plugin.StandardNodePlugin;
import com.softwareag.xtools.xapplication.plugin.VariablesHandler;
public class MyNodePlugin {
public static String equal(BusinessDocument doc, Object node, String refValue, VariablesHandler vh) throws XException {
refValue = vh.evaluatingReplace(refValue);
return StandardNodePlugin.equal(doc, node, refValue);
}
public static String notEqual(BusinessDocument doc, Object node, String refValue, VariablesHandler vh) throws XException {
refValue = vh.evaluatingReplace(refValue);
return StandardNodePlugin.notEqual(doc, node, refValue);
}
}
#Tamino#webMethods#API-Management