Hello all!
I have a great problems with new qooxdoo.
For example:
in 082, RadioButton had a string value. This code works fine:
var manager = new
qx.ui.form.RadioButton(application.tr("Manager"));
manager.setValue("Manager");
var mgr = new qx.ui.form.RadioGroup;
mgr.add(manager, client, dealer);
mgr.bind("changeValue", application.loginData, "mode");
So, I can put a free form string to radio buttons, group them to
RadioGroup, and bind them to a string property. And this string not
required to be the same as label - this is important, and can be used
for translations.
In 083, RadioButton have no string value, only boolean value -- why????
In html terms, how do I suppose build a query, if I don't know what
exactly this radio is, "true/false" info isn't sufficient.
More, I couldn't get same behaviour easily with binding in 083.
I tried such way:
var manager = new
qx.ui.form.RadioButton(application.tr("Manager"));
manager.setUserData("v", "Manager");
var mgr = new qx.ui.form.RadioGroup;
.....
alert(manager);
var options = {
converter:function(value)
{
alert(value);
return value.getUserData("v");
};
......
mgr.bind("changeSelection", application.loginData, "mode",
options);
But this not working.
However, both alert(manager); and alert(value); produces same
"qx.ui.form.RadioButton[6y]".
But, from experiments:
value != manager,
value have no methods "getUserData", "toHashCode" etc.
I could get it's all working only with such bad code:
var options = {
converter:function(value)
{
if("" + value == "" + manager)
{
return "Manager";
}
if("" + value == "" + client)
{
return "Client";
}
if("" + value == "" + dealer)
{
return "Dealer";
}
}
};
I looked into new Form API, I see that mixin IFormElement is deprecated,
and all elements have now setName/getName - deprecated.
Can someone point me, what except Name can be used to build forms, like
this:
"Please enter your name": textLabel, name: textfield;
"Please enter your password": textLabel, password : textfield;
and from this code form a query, like this:
"name=enteredName&password=enteredPassword"
NOT using labels, but names of fields.
I have own FormBuilder, and I had to make this queries, to act with
server, and I totally confused why them are dropped.
Yes, I saw Form examples, there using something like this:
var userName =new qx.ui.form.TextField();
userName.setRequired(true);
form.add(userName,"Name");
But here's no "name" of userName field, only Label?...
--
Best Regards
Alexander Yerenkow,
Generalissimo of UCT
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel