Great! Just changed my code, 10 lines less for every
selectbox/radiobuttongroup! Thanks for hearing us.
On Thu, Sep 17, 2009 at 6:44 AM, thron7 <thomas.herchenroe...@1und1.de>wrote:
> Guys,
>
> it would be better if you created a dedicated bug for this in bugzilla,
> and add the patch as an attchment to it. Makes it easier for others that
> have the same need, and for us, to retrace which patches are out.
>
> T.
>
> MartinWittemann wrote:
> > Hi,
> > I'm not the diff expert so i hope it works. (I also hope the nabble
> > interface works with the file uploading). Let me know it its working for
> > you.
> > http://n2.nabble.com/file/n3661722/controller.Form.diffcontroller.Form.diff
> > http://n2.nabble.com/file/n3661722/form.MModelSelection.diff
> > form.MModelSelection.diff
> > http://n2.nabble.com/file/n3661722/menu.RadioButton.diff
> > menu.RadioButton.diff
> > http://n2.nabble.com/file/n3661722/toolbar.RadioButton.diff
> > toolbar.RadioButton.diff
> > Best,
> > Martin
> >
> >
> > Jean-Noël Rivasseau wrote:
> >
> >> Very nice.
> >>
> >> Yes, I would prefer to stay on 0.8.3 - can you send me the patches?
> >>
> >> Jean-Noel
> >>
> >> On Thu, Sep 17, 2009 at 8:40 AM, MartinWittemann
> >> <martin.wittem...@1und1.de>wrote:
> >>
> >>
> >>> Hi,
> >>>
> >>> thanks for sharing your thoughts. We agree that the current way of
> >>> binding
> >>> the modelSelection is not suitable for the demands qooxdoo has. Thats
> why
> >>> we
> >>> opened up the bug. The proposed mixin is just a workarount and not the
> >>> solution which is in the framework in the end.
> >>> I already fix the issue and the solution would look like this:
> >>>
> >>> controller.addTarget(selectbox, "modelSelection[0]", "modelProperty",
> >>> true);
> >>>
> >>> We are back to a one line of code and that already works in the trunk.
> I
> >>> guess that is something you like to see, right?
> >>>
> >>> If you want to stay on your 0.8.3 release i can send you the patches to
> >>> apply to have only that new feature.
> >>>
> >>> Best,
> >>> Martin
> >>>
> >>>
> >>>
> >>> Jean-Noël Rivasseau wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I spent a lot of time understanding the APIs change and such. Here are
> >>>>
> >>> my
> >>>
> >>>> remarks:
> >>>>
> >>>> * Currently it has become awfully complex and ugly to bind a SelectBox
> >>>>
> >>> or
> >>>
> >>>> a
> >>>> RadioButtonGroup to a simple property value. This is because you have
> >>>>
> >>> to
> >>>
> >>>> use
> >>>> *two* controllers to bind, since in one controller you must use the
> >>>> "modelSelection" property as target, and in the other, you must use
> >>>> "selection" as an event to listen on. You cannot use a simple
> >>>> bidirectional
> >>>> controller, and on top of that, you must add some converters.
> >>>>
> >>>> So it is clearly for me a regression, what was a one liner has become
> >>>>
> >>> 10
> >>>
> >>>> lines of ugly boilerplate code. I agree that maybe an API change was
> >>>> needed,
> >>>> but if it makes stuff more complex instead of easier, this is not
> good.
> >>>>
> >>>> 2) The proposed change (that is linked in the bug) really does not
> seem
> >>>> ideal to me, because it forces you to define models as objects that
> >>>>
> >>> have
> >>> a
> >>>
> >>>> "value" property so that it works. In most cases I guess what people
> >>>>
> >>> will
> >>>
> >>>> want is just a simple String acting as the value, thus the model will
> >>>>
> >>> be
> >>>
> >>>> the
> >>>> value. The Mixin that is posted in the bug *should* act like this, eg
> >>>>
> >>> test
> >>>
> >>>> if we are dealing wit a simple string as the model, and if yes, use
> >>>>
> >>> that
> >>>
> >>>> as
> >>>> the value. This is mandatory IMHO to keep things going smoothly...
> >>>>
> >>>> 3) Is the Mixin linked in the bug available in trunk now? The bug is
> >>>>
> >>> not
> >>>
> >>>> marked as fixed yet. How can I use this mixin? Is trunk stable enough
> >>>> right
> >>>> now? I am wary of moving away from an official release, but this API
> >>>> change
> >>>> without the mixin is so painful that I probably will.
> >>>>
> >>>> Jean-Noel
> >>>>
> >>>>
> >>>> On Wed, Sep 16, 2009 at 4:54 PM, MartinWittemann
> >>>> <martin.wittem...@1und1.de>wrote:
> >>>>
> >>>>
> >>>>> Hello
> >>>>>
> >>>>> sure this is still possible but a bit complicated in the release
> >>>>>
> >>> version.
> >>>
> >>>>> Take a look at the following email to see how it works with a radio
> >>>>> group,
> >>>>> which is basically the same as a selectbox.
> >>>>>
> >>>>>
> >>>>>
> >>>
> http://n2.nabble.com/RadioButtonGroup-and-ModelSelection-td3573156.html#a3573156
> >>>
> >>>>> But we are aware of thie and that its a bit complicated so we opend
> up
> >>>>>
> >>> a
> >>>
> >>>>> bug
> >>>>> report to make it more comfortable.
> >>>>> http://bugzilla.qooxdoo.org/show_bug.cgi?id=2778
> >>>>> As you can see, it is already fixed and can now be bound line one
> line
> >>>>> again.
> >>>>>
> >>>>> Regards,
> >>>>> Martin
> >>>>>
> >>>>>
> >>>>>
> >>>>> Jean-Noël Rivasseau wrote:
> >>>>>
> >>>>>> Hello, when upgrading our app to 0.8.3 I encounter the following
> >>>>>>
> >>>>> problem:
> >>>>>
> >>>>>> I previously used data binding for a simple property related to a
> >>>>>> SelectBox.
> >>>>>> It was ok like that:
> >>>>>>
> >>>>>> controller.addTarget(widget.rightSelect, "value",
> >>>>>>
> >>>>> "rightMode",
> >>>>>
> >>>>>> true);
> >>>>>>
> >>>>>> But now "value" is deprecated for SelectBox and I cannot find an
> >>>>>>
> >>> easy
> >>>
> >>>>>> equivalent. There is now a special Selection controller but it looks
> >>>>>>
> >>>>> like
> >>>>>
> >>>>>> it
> >>>>>> is intended to work with arrays; and here my property is a simple
> >>>>>>
> >>>>> String.
> >>>>>
> >>>>>> I
> >>>>>> changed the ListItem values properties to model instead, but there
> >>>>>>
> >>> is
> >>>
> >>>>> no
> >>>>>
> >>>>>> setModel() method on SelectBox.
> >>>>>>
> >>>>>> I tried
> >>>>>> controller.addTarget(widget.rightSelect,
> >>>>>>
> >>> "modelSelection",
> >>>
> >>>>>> "rightMode", true);
> >>>>>>
> >>>>>> but that wont work with data binding as there is no
> >>>>>>
> >>>>> "changeModelSelection"
> >>>>>
> >>>>>> event...
> >>>>>>
> >>>>>> So I am stuck. value worked very well before, I understand that you
> >>>>>> changed
> >>>>>> the API (although let me say that this caused hundred of
> >>>>>>
> >>> deprecations
> >>>
> >>>>>> warnings in our app; basically everything we were doing with form
> >>>>>>
> >>>>> widgets
> >>>>>
> >>>>>> had to be upgraded...), but what's the correct way to deal with this
> >>>>>>
> >>>>> now?
> >>>>>
> >>>>>> It's a simple case, bind a single selection listItem to a property,
> >>>>>>
> >>> so
> >>>
> >>>>>> that
> >>>>>> should be possible.
> >>>>>>
> >>>>>> Martin?
> >>>>>>
> >>>>>> Jean-Noel
> >>>>>>
> >>>>>>
> >>>>>>
> >>>
> ------------------------------------------------------------------------------
> >>>
> >>>>>> 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
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> ------------------------------------------------------------------------------
> >>>
> >>>> 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
> >>>> qooxdoo-devel@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >>>>
> >>>>
> >>>>
> >>> --
> >>> View this message in context:
> >>>
> http://n2.nabble.com/How-to-use-data-binding-for-a-SelectBox-which-is-intended-for-single-selection-tp3656721p3661252.html
> >>> Sent from the Q&A mailing list archive at Nabble.com.
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------------
> >>> 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
> >>> qooxdoo-devel@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >>>
> >>>
> >>
> ------------------------------------------------------------------------------
> >> 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
> >> qooxdoo-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >>
> >>
> >>
> >
> >
>
>
> ------------------------------------------------------------------------------
> 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
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
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
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel