Permalink
Browse files

- Form and Wizard return native object now instead of json

- Fixed a couple of bugs

git-svn-id: https://qooxdoo-contrib.svn.sourceforge.net/svnroot/qooxdoo-contrib@20009 09f7d036-9b2a-0410-8fbe-9cff4eb17569
  • Loading branch information...
1 parent 898205b commit feaf9ed161e59fc6084aa5235d3294442e22b08d cboulanger committed Apr 25, 2010
Showing with 15 additions and 6 deletions.
  1. +1 −1 source/class/dialog/Dialog.js
  2. +13 −3 source/class/dialog/Form.js
  3. +1 −2 source/class/dialog/Wizard.js
@@ -185,7 +185,7 @@ qx.Class.define("dialog.Dialog",
allowCancel :
{
check : "Boolean",
- init : false,
+ init : true,
event : "changeAllowCancel"
}
},
@@ -482,7 +482,7 @@ qx.Class.define("dialog.Form",
if ( ! validatorObj.__asyncInProgress )
{
validatorObj.__asyncInProgress = true;
- qx.core.Init.getApplication().executeService(
+ qx.core.Init.getApplication().getRpcManager().execute(
service.name, service.method, [value], function(response)
{
try {
@@ -507,6 +507,14 @@ qx.Class.define("dialog.Form",
}
/*
+ * placeholder
+ */
+ if ( fieldData.placeholder !== undefined )
+ {
+ formElement.setPlaceholder( fieldData.placeholder );
+ }
+
+ /*
* add label and form element to form
*/
var label = fieldData.label;
@@ -530,13 +538,15 @@ qx.Class.define("dialog.Form",
/**
* Hook for subclasses to do something with the form, for example
* in order to attach bindings to the validation manager.
- * Empty stub to be overridden.
+ * Default behavior: bind the enabled state of the "OK" button to the
+ * validity of the current form.
+ *
* @param form {qx.ui.form.Form}
* @return {void}
*/
_onFormReady : function( form )
{
- return;
+ form.getValidationManager().bind( "valid", this._okButton, "enabled" );
},
/*
@@ -235,7 +235,6 @@ qx.Class.define("dialog.Wizard",
* bind the enabled state of the "finish" button to the validity of the
* current form and the state of the "allowFinish" property
*/
-
form.getValidationManager().bind( "valid", this._finishButton, "enabled", {
converter : function( value ){
return value && _this.getAllowFinish() ? true:false;
@@ -376,7 +375,7 @@ qx.Class.define("dialog.Wizard",
this.hide();
if( this.getCallback() )
{
- this.getCallback()( qx.util.Json.parse( qx.util.Serializer.toJson( this.getModel() ) ) );
+ this.getCallback()( qx.util.Json.parse( qx.util.Serializer.toNativeObject( this.getModel() ) ) );
}
this.resetCallback();
}

0 comments on commit feaf9ed

Please sign in to comment.