X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2Fexecution%2FValue.js;h=b5944a019ab09ac17b5d7309ecaa5ebdf1c9358d;hb=ec2898121c88966ac4d49d549d55107f26ccbb4b;hp=8895df8b99eeee7bb07f267b4c9e145c7d683b09;hpb=5aa18045bcdd46992b9417f7864fec455e9fc979;p=gpl%2Fargeo-slc.git
diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Value.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Value.js
index 8895df8b9..b5944a019 100644
--- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Value.js
+++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Value.js
@@ -80,8 +80,8 @@ qx.Class.define("org.argeo.slc.ria.execution.Value", {
if(child.nodeName == "slc:primitive-spec-attribute"){
this.setSpecType("primitive");
this.setSpecSubType(org.argeo.ria.util.Element.getSingleNodeText(child, "@type"));
- if(org.argeo.ria.util.Element.getSingleNodeText(child, "slc:value")){
- this.setValue(org.argeo.ria.util.Element.getSingleNodeText(child, "slc:value"));
+ if(org.argeo.ria.util.Element.getSingleNodeText(child, ".")){
+ this.setValue(org.argeo.ria.util.Element.getSingleNodeText(child, "."));
}
}else if(child.nodeName == "slc:ref-spec-attribute"){
this.setSpecType("ref");
@@ -94,31 +94,19 @@ qx.Class.define("org.argeo.slc.ria.execution.Value", {
});
}
},
-
- /**
- * Apply the value from the node
- * @param xmlNode {Node} Castor representation of this object
- */
- _applyXmlValue : function(xmlNode){
- var xpath;
- if(this.getSpecType() == "primitive"){
- xpath = "slc:primitive-value/slc:value";
- }else if(this.getSpecType() == "ref"){
- xpath = "slc:ref-value/slc:label";
- }
- this.setValue(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, xpath));
- },
-
+
/**
* Create an XML Representation of this value
* @return {String} The XML String
*/
toAttributeXml : function(){
- var valueTag = ''+this.getValue()+'';
+ var valueTag = '';
var specAttribute = '';
if(this.getSpecType() == "primitive"){
+ valueTag = (this.getValue()?this.getValue():'');
specAttribute = ''+valueTag+'';
}else if(this.getSpecType() == "ref"){
+ valueTag = (this.getValue()?''+this.getValue()+'':'');
specAttribute = ''+valueTag+'';
}
return ''+specAttribute+'';
@@ -128,7 +116,7 @@ qx.Class.define("org.argeo.slc.ria.execution.Value", {
var valueTag = '';
var specAttribute = '';
if(this.getSpecType() == "primitive"){
- valueTag = ''+this.getValue()+'';
+ valueTag = this.getValue();
specAttribute = ''+valueTag+'';
}else if(this.getSpecType() == "ref"){
valueTag = ''+this.getValue()+'';