hi,
what is the easiest way to get/set a value from/to a selectbox.
I have create a simple example. I want the first button to get the selected
value and with
the second button to set the value 'number 109'.
I use qooxdoo 1.0.
Can someone help me?
Thanks!
Application.js:
/*
#asset(testselect/*)
*/
qx.Class.define("testselect.Application",
{
extend : qx.application.Standalone,
construct : function()
{
this.base(arguments);
this.widgets = new Array();
},
members :
{
widgets : null,
main : function()
{
this.base(arguments);
var selectBox = new qx.ui.form.SelectBox();
for (var i = 100; i < 120; i++)
{
var tempItem = new qx.ui.form.ListItem("number
" + (i+1));
selectBox.add(tempItem);
}
this.widgets["TestSelectBox"] = selectBox;
var button1 = new qx.ui.form.Button("Get value");
button1.addListener("execute", function(e) {
alert("Get value from -->
this.widgets['TestSelectBox'] <--");
});
var button2 = new qx.ui.form.Button("Set value 'number
109'");
button2.addListener("execute", function(e) {
alert("Set value 'number 109' to -->
this.widgets['TestSelectBox']
<--");
});
var doc = this.getRoot();
doc.add(this.widgets["TestSelectBox"], {left: 10, top:
50});
doc.add(button1, {left: 250, top: 50});
doc.add(button2, {left: 500, top: 50});
}
}
});
--
View this message in context:
http://n2.nabble.com/Get-Set-value-from-to-selectbox-qooxdoo-1-0-tp4397911p4397911.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel