]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js
2 * Wrapper for ExecutionFlow server object
4 qx
.Class
.define("org.argeo.slc.ria.execution.Flow", {
6 extend
: qx
.core
.Object
,
10 * Name of this Execution Flow
17 * Name of the associated spec, to be found in the module
23 * Reference the actual ExecutionSpec object
26 check
: "org.argeo.slc.ria.execution.Spec"
32 * Castor representation of the object
35 apply
: "_applyXmlNode"
41 XPATH_EXEC_SPEC_NAME
: "@executionSpec",
42 XPATH_VALUES
: "slc:values"
45 construct : function(){
51 * Init the object from an XML representation
52 * @param xmlNode {Node} Castor representation of this object
54 _applyXmlNode : function(xmlNode
){
56 name
: org
.argeo
.ria
.util
.Element
.getSingleNodeText(xmlNode
, this.self(arguments
).XPATH_NAME
),
57 executionSpecName
: org
.argeo
.ria
.util
.Element
.getSingleNodeText(xmlNode
, this.self(arguments
).XPATH_EXEC_SPEC_NAME
)
59 var values
= org
.argeo
.ria
.util
.Element
.selectNodes(xmlNode
, this.self(arguments
).XPATH_VALUES
);
60 this.setValues(values
[0]);
62 getValue: function(key
, specType
, specSubType
){
64 if(specType
== "primitive"){
65 xpath
= 'slc:value[@key="'+key
+'"]/slc:primitive-value[@type="'+specSubType
+'"]/slc:value';
66 }else if(specType
== "ref"){
67 xpath
= 'slc:value[@key="'+key
+'"]/slc:ref-value/slc:label';
69 return org
.argeo
.ria
.util
.Element
.getSingleNodeText(this.getValues(), xpath
);