Author: rahul
Date: Tue Aug 23 21:01:22 2005
New Revision: 239519
URL: http://svn.apache.org/viewcvs?rev=239519&view=rev
Log:
RootContext (used in the JSP environment) should override base class's "boolean
has(String)" method
Modified:
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java
Modified:
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java?rev=239519&r1=239518&r2=239519&view=diff
==============================================================================
---
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java
(original)
+++
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/env/RootContext.java
Tue Aug 23 21:01:22 2005
@@ -66,6 +66,29 @@
}
/**
+ * Does the given variable exist in this Context.
+ *
+ * @param name The name of the variable
+ * @return boolean true if the variable exists
+ * @see org.apache.commons.scxml.Context#has(java.lang.String)
+ */
+ public boolean has(final String name) {
+ boolean exists = super.has(name);
+ Object value = null;
+ if (!exists) {
+ try {
+ value = vr.resolveVariable(name);
+ } catch (ELException ele) {
+ log.error(ele.getMessage(), ele);
+ }
+ if (value != null) {
+ exists = true;
+ }
+ }
+ return exists;
+ }
+
+ /**
* Get the Iterator.
*
* @see org.apache.commons.scxml.Context#iterator()
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]