Hello,

A User can choose and select some items from selectBoxes and fill in values
in text fields.
After selection the user clicks on "Send" and all items will be send to
database.

My code:
---------------------------------------
var modelSkeleton = {copies: "1", printoption: null, deadline: "", collate:
""};
 var model = qx.data.marshal.Json.createModel(modelSkeleton);
 // create the controller
this.controller = new qx.data.controller.Object(model);
// connect the copies
this.controller.addTarget(this.__txtCopies, "value", "copies", true);
// connect the deadline
this.controller.addTarget(this.__txtDeadline, "value", "deadline", true);
// connect the select box Printoption
this.controller.addTarget(this.__selectBoxPrintOption, "modelSelection[0]",
"printoption", true);
this.controller.addTarget(this.__ChkSort, "value", "collate", true);

..
this.__selectBoxPrintOption = new qx.ui.form.SelectBox();
this.__selectBoxPrintOption.setWidth(150);
var data = [{label: this.tr("Simplex"), id: "Simplex", icon:
"mobilewebjobticket/simplex.png"}, {label: this.tr("Duplex (long edge)"),
id: "DuplexLongEdge", icon: "mobilewebjobticket/duplex_long_edge_24.png"},
{label: this.tr("Duplex (short edge)"), id: "DuplexShortEdge", icon:
"mobilewebjobticket/duplex_short_edge_24.png"}, {label: this.tr("Booklet"),
id: "Booklet", icon: "mobilewebjobticket/booklet_24.png"}];
var model = qx.data.marshal.Json.createModel(data);
var controller = new qx.data.controller.List(null,
this.__selectBoxPrintOption, "label");
controller.setDelegate({bindItem : function(controller, item, id) {
  controller.bindDefaultProperties(item, id);
 controller.bindProperty("id", "model", null, item, id);
}});
controller.setIconPath("icon");
controller.setModel(model);
---------------------------------------------------

How can I reset all SelectBoxes, Checkboxes and Textfields after sending?

I tried it like in the demo browser example
http://demo.qooxdoo.org/current/demobrowser/#data~SelectBox.html

like
this.controller.getSelection().setItem(0, "C");
but this does not work for me.

thanks for any help.

kind regards
Hansjoerg




 

--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/reset-set-SelectBox-tp6687060p6687060.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to