[KSS-checkins] r50399 - in kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes: . doc kukit
reebalazs at codespeak.net
reebalazs at codespeak.net
Sun Jan 6 17:19:40 CET 2008
Author: reebalazs
Date: Sun Jan 6 17:19:40 2008
New Revision: 50399
Modified:
kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/ (props changed)
kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/doc/HISTORY.txt
kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js
kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js
Log:
Implement evaluation of value providers with multiprop (selector in same line)
Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/doc/HISTORY.txt (original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/doc/HISTORY.txt Sun Jan 6 17:19:40 2008
@@ -17,6 +17,10 @@
action parameters (remark: they should
be used with kssSelector.)
They now give a parsing error.
+
+ Implement multiproperties in
+ * action-client and action-server
+ * any value provider
[ree]
- Fix multiple selection form fields
Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js (original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/kssparser.js Sun Jan 6 17:19:40 2008
@@ -342,7 +342,7 @@
var valuesByReturnType = this.preprocessValues(values, allowedReturnTypes, kukit.E);
value = valuesByReturnType.string;
// Store the selector on the value.
- value.selectorProvider = valuesByReturnType.selection;
+ value.selectionValue = valuesByReturnType.selection;
}
// store the (main, string) value
action.parms[key] = value;
Modified: kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js
==============================================================================
--- kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js (original)
+++ kukit/kukit.js/branch/ree-1.4-markup-and-syntax-changes/kukit/resourcedata.js Sun Jan 6 17:19:40 2008
@@ -202,7 +202,7 @@
;;; // If a provider expects all strings
;;; // (like most value providers), it simply leaves this flag
;;; // intact, and we do the check here.
-;;; if (! this.checkedArgTypes) {
+;;; if (! this.pprovider.checkedArgTypes) {
;;; // We expect a string to each position.
;;; // By default, returnType is "string" so we also
;;; // check undefined.
@@ -221,6 +221,20 @@
kukit.rd.KssMethodValue.prototype.evaluate =
function(node, defaultParameters) {
+ // In case we have a selector, evaluate it.
+ if (this.selectionValue) {
+ var nodes = this.selectionValue.evaluate(node, defaultParameters)
+ // This must have returned exactly one node. If not, we raise error.
+ if (nodes.length != 1) {
+;;; kukit.E = 'Selection provider [' + this.selectionValue.methodName;
+;;; kukit.E += '] of value provider [' + this.methodName;
+;;; kukit.E += '] must select exactly one node, '
+;;; kukit.E += 'got [' + nodes.length + '] instead.';
+ throw new Error(kukit.E);
+ }
+ // Use this as node!
+ node = nodes[0];
+ }
// First recursivly evaluate all arguments
var newArgs = [];
for(var i=0; i < this.args.length; i++){
More information about the Kukit-checkins
mailing list