You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2007/02/16 05:28:16 UTC
svn commit: r508307 - in /cocoon: branches/BRANCH_2_1_X/status.xml
trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsSuggest.js
Author: antonio
Date: Thu Feb 15 20:28:15 2007
New Revision: 508307
URL: http://svn.apache.org/viewvc?view=rev&rev=508307
Log:
<action dev="AG" type="fix" fixes-bug="COCOON-2011" due-to="Paul Friedman" due-to-email="paul.friedman@quoininc.com">
CForms: CFormsSuggest widget does not implement the onValueChanged event.
</action>
Modified:
cocoon/branches/BRANCH_2_1_X/status.xml
cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsSuggest.js
Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/status.xml?view=diff&rev=508307&r1=508306&r2=508307
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Thu Feb 15 20:28:15 2007
@@ -181,6 +181,9 @@
<changes>
<release version="2.1.11" date="TBD">
+ <action dev="AG" type="fix" fixes-bug="COCOON-2011" due-to="Paul Friedman" due-to-email="paul.friedman@quoininc.com">
+ CForms: CFormsSuggest widget does not implement the onValueChanged event.
+ </action>
<action dev="CZ" type="fix" fixes-bug="COCOON-1927" due-to="Richard Frovarp">
Core: EHCache now uses the configured cache directory instead of using the default of java.io.tempdir.
</action>
Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsSuggest.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsSuggest.js?view=diff&rev=508307&r1=508306&r2=508307
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsSuggest.js (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsSuggest.js Thu Feb 15 20:28:15 2007
@@ -37,18 +37,22 @@
dojo.widget.defineWidget(
"cocoon.forms.CFormsSuggest",
dojo.widget.ComboBox, {
-
+
// Widget definition
ns: "forms",
widgetType: "CFormsSuggest",
-
+ // properties
+ onchange: "",
+ name: "",
+
fillInTemplate: function(args, frag) {
this.mode = "remote";
var node = this.getFragNodeRef(frag);
var form = cocoon.forms.getForm(node);
+ this.form = form;
var contId = form["continuation-id"].value;
if (!contId) throw "Cannot find continuation Id";
-
+
if (!this.dataUrl || this.dataUrl == "") {
this.dataUrl = "_cocoon/forms/suggest?widget=" + node.getAttribute("name") +
"&continuation-id=" + contId + "&filter=%{searchString}";
@@ -62,6 +66,12 @@
// Restore the initial value and the associated suggestion text, if any
this.setValue(node.getAttribute("suggestion") ? node.getAttribute("suggestion") : node.value);
this.setSelectedValue(node.value);
+ }
+ },
+
+ onValueChanged: function(/*String*/ value){
+ if (this.onchange == "cocoon.forms.submitForm(this)") {
+ cocoon.forms.submitForm(this.domNode, this.name);
}
},