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=d31cf6b3af4c071b1952b1120a2893c9bf985c13;hb=43a20cbd46654d84ab1610ddb1ac6bbb058fe0c3;hp=9981f46ceb507c75f6cd089154431150abebb4fb;hpb=57f3f674573109ece71b4424e92a71acc12dff92;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 9981f46ce..d31cf6b3a 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 @@ -13,24 +13,42 @@ qx.Class.define("org.argeo.slc.ria.execution.Value", { check : "String", init : "" }, + /** + * The type of this value, for the moment "primitive" and "ref" are supported + */ specType : { check : "String", init : "" }, + /** + * Subtype, depending on the "type". + */ specSubType : { check : "String" }, + /** + * Whether it is a parameter or not + */ parameter : { check : "Boolean" }, + /** + * Whether it is frozen on the server, i.e. disabled in the form + */ frozen : { check : "Boolean" }, + /** + * Should not be editable nor seeable, thus hidden + */ hidden : { check : "Boolean" }, + /** + * The real value + */ value : { - + nullable : true }, /** * Castor representation of the object @@ -58,12 +76,12 @@ qx.Class.define("org.argeo.slc.ria.execution.Value", { var childs = xmlNode.childNodes; for(var i=0;i'+valueTag+''; + }else if(this.getSpecType() == "ref"){ + valueTag = ''+this.getValue()+''; + specAttribute = ''+valueTag+''; + } + return ''+specAttribute+''; + }, - _applyXmlValue : function(xmlNode){ - var xpath; + toValueXml : function(){ + var valueTag = ''; + var specAttribute = ''; if(this.getSpecType() == "primitive"){ - xpath = "slc:primitive-value/slc:value"; + valueTag = this.getValue(); + specAttribute = ''+valueTag+''; }else if(this.getSpecType() == "ref"){ - xpath = "slc:ref-value/slc:label"; + valueTag = ''+this.getValue()+''; + specAttribute = ''+valueTag+''; } - this.setValue(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, xpath)); + return ''+specAttribute+''; } }