summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-02-25 04:36:56 (EST)
committerSven Rottstock2013-03-11 06:37:42 (EDT)
commitcc70ca28c6a749ed230aff74fb319d3ebbc93531 (patch)
tree8e0b9fa54f8cf643d3e6c731849f9e8de900fb86
parent5f912de2339a02c718a20f28b8398e11157dc72b (diff)
downloadorg.eclipse.stardust.ui.web-cc70ca28c6a749ed230aff74fb319d3ebbc93531.zip
org.eclipse.stardust.ui.web-cc70ca28c6a749ed230aff74fb319d3ebbc93531.tar.gz
org.eclipse.stardust.ui.web-cc70ca28c6a749ed230aff74fb319d3ebbc93531.tar.bz2
Jira-ID: CRNT-27907
Added code to read data from current model in XPathCacheManager.getXpathMap(model,dataPath) Used data.getReference().getId() to get the TypeDeclaration when typeDeclarationId is null in XPathCacheManager.getTypeCacheKey() git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63215 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java
index 0f3efe3..8cf961f 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java
@@ -100,7 +100,13 @@ public class XPathCacheManager
Model refModel = getReferenceModel(model, dataPath);
Data data = refModel.getData(dataPath.getData());
-
+ if (null == data)
+ {
+ // When data is created in consumer model using Composite Type of Provider model,
+ // search the data in consumer model (Pass by reference)
+ data = model.getData(dataPath.getData());
+ }
+
if (!cacheEnabled)
{
if (trace.isDebugEnabled())
@@ -109,7 +115,7 @@ public class XPathCacheManager
}
return ClientXPathMap.getXpathMap(refModel, data);
}
-
+
// Caching Mechanism
Long dataCachKey = getDataCacheKey(refModel, data);
IXPathMap xPathMap = dataXPathMapCache.get(dataCachKey);
@@ -179,7 +185,13 @@ public class XPathCacheManager
{
// user-defined structured data
String typeDeclarationId = (String) data.getAttribute(StructuredDataConstants.TYPE_DECLARATION_ATT);
- typeDeclaration = model.getTypeDeclaration(typeDeclarationId);
+ typeDeclaration = typeDeclarationId != null ? model.getTypeDeclaration(typeDeclarationId) : model
+ .getTypeDeclaration(data.getReference().getId()); // Use dataReferenceId
+ // to get TypeDeclaration
+ // for pass by
+ // reference(using
+ // composite type of
+ // Provider model)
}
else
{
@@ -208,7 +220,7 @@ public class XPathCacheManager
return new TypeDeclarationCacheKey(qName, model.getModelOID());
}
-
+
/**
* @param model
* @param data