var pfn1TF = this.__pfn1TF = new qx.ui.form.TextField(this.tr("A full
firstname"));
pfn1TF.setRequired(true);
pfn1TF.setWidth(200);
var pfn1L = this.__pfn1L = new qx.ui.basic.Label(this.tr("Firstname"));
pfn1L.setBuddy(pfn1TF);
pfn1L.setAlignY("middle");
var pfn2TF = this.__pfn2TF = new qx.ui.form.TextField(this.tr("A full
firstname"));
pfn2TF.setRequired(true);
pfn2TF.setWidth(200);
var pfn2L = this.__pfn2L = new qx.ui.basic.Label(this.tr("Firstname"));
pfn2L.setBuddy(pfn2TF);
pfn2L.setAlignY("middle");
var validator = this.__validator = new qx.ui.form.validation.Manager();
validator.add(this.__pfn2TF, null);
var controller = new qx.data.controller.Object();
controller.addTarget(this.__pfn2TF, "value", "firstname", true);
var skeleton = {
firstname : null
};
this.__model = qx.data.marshal.Json.createModel(skeleton, true);
controller.setModel(this.__model);
this.__model.addListener("changeBubble", function(e) {
validator.validate();
}, this);
// invoke the inital validate
validator.validate();
var root = this.getRoot();
root.setLayout(new qx.ui.layout.Grid(2, 2));
root.add(pfn1L, {row: 0, column: 0});
root.add(pfn1TF, {row: 0, column: 1});
root.add(pfn2L, {row: 1, column: 0});
root.add(pfn2TF, {row: 1, column: 1});
-----------------------
Two examples. One with binding and one without.
Stefan
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel