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%2FFlow.js;h=124e14e8ab9f5ebe68c57f85c0c40e3755608d18;hb=57f3f674573109ece71b4424e92a71acc12dff92;hp=ed23ff04a158a2a4ad562fcb82ce30f82bb4d95d;hpb=f3b5fa3d8f79c21748ddc88e8ad5062f4a413369;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/Flow.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js index ed23ff04a..124e14e8a 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js @@ -25,6 +25,9 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { executionSpec : { check : "org.argeo.slc.ria.execution.Spec" }, + values : { + check : "Node" + }, /** * Castor representation of the object */ @@ -39,7 +42,9 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { XPATH_VALUES : "slc:values" }, - construct : function(){}, + construct : function(){ + this.base(arguments); + }, members : { /** @@ -51,7 +56,18 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { name : org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_NAME), executionSpecName : org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_EXEC_SPEC_NAME) }); - } + var values = org.argeo.ria.util.Element.selectNodes(xmlNode, this.self(arguments).XPATH_VALUES); + this.setValues(values[0]); + }, + getValue: function(key, specType, specSubType){ + var xpath; + if(specType == "primitive"){ + xpath = 'slc:value[@key="'+key+'"]/slc:primitive-value[@type="'+specSubType+'"]/slc:value'; + }else if(specType == "ref"){ + xpath = 'slc:value[@key="'+key+'"]/slc:ref-value/slc:label'; + } + return org.argeo.ria.util.Element.getSingleNodeText(this.getValues(), xpath); + } } }); \ No newline at end of file