Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New IModelForm interface for fields containing model/object like values
- Loading branch information
Showing
3 changed files
with
189 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* ************************************************************************ | ||
qooxdoo - the new era of web development | ||
http://qooxdoo.org | ||
Copyright: | ||
2016 Martijn Evers, The Netherlands | ||
License: | ||
LGPL: http://www.gnu.org/licenses/lgpl.html | ||
EPL: http://www.eclipse.org/org/documents/epl-v10.php | ||
See the LICENSE file in the project's top-level directory for details. | ||
Authors: | ||
* Martijn Evers (mever) | ||
************************************************************************ */ | ||
|
||
/** | ||
* Form interface for all form widgets which have an | ||
* model object (i.e. {qx.core.Object}) as their primary data type. | ||
*/ | ||
qx.Interface.define("qx.ui.form.IModelForm", | ||
{ | ||
/* | ||
***************************************************************************** | ||
EVENTS | ||
***************************************************************************** | ||
*/ | ||
|
||
events : | ||
{ | ||
/** Fired when the value was modified */ | ||
"changeValue" : "qx.event.type.Data" | ||
}, | ||
|
||
|
||
|
||
/* | ||
***************************************************************************** | ||
MEMBERS | ||
***************************************************************************** | ||
*/ | ||
|
||
members : | ||
{ | ||
/* | ||
--------------------------------------------------------------------------- | ||
VALUE PROPERTY | ||
--------------------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* Sets the element's value. | ||
* | ||
* @param value {qx.core.Object|null} The new value of the element. | ||
*/ | ||
setValue : function(value) { | ||
return arguments.length == 1; | ||
}, | ||
|
||
|
||
/** | ||
* Resets the element's value to its initial value. | ||
*/ | ||
resetValue : function() {}, | ||
|
||
|
||
/** | ||
* The element's user set value. | ||
* | ||
* @return {qx.core.Object|null} The value. | ||
*/ | ||
getValue : function() {} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters