Martin,
I found what the problem was. Turns out that I was using my tree widget in
the addTarget method, replacing that for the treeController solves the
problem.

That's is really cool. Now with 150 lines I was able to replace my old and
ugly code (339 lines).

Thanks.

On Tue, Aug 18, 2009 at 4:11 AM, MartinWittemann
<[email protected]>wrote:

>
> Hello Guilherme,
>
> looks like there is something wrong with the binding of both directions.
> But
> I can't tell you what because I don't get the whole scenario.
>
> You are using a tree controller and want to sync the selection (which is an
> array) with another array showing widget? Is it singe or multi selection?
> Have you tried to set up the binding manually in the opposite direction?
> Does that work? Perhaps we do have her some kind of 'array' problem. But as
> long I can't reproduce it, I don't know why its not working. Perhaps you
> could extract the problem to a playground example?
>
> Best,
> Martin
>
>
>
> Krycek wrote:
> >
> > Hi Martin,
> > I couldn't use two controllers to the same form. And the demo you pointed
> > doesn't help because there is no controller in the SelectBox.
> >
> > Here is what I want to do:
> >
> > Have two controllers interacting someway in the same form:
> >
> > 1) One controller to bind my categories model to my tree (right, doing
> > that
> > one alone is ok) - pretty much the same as:
> > http://demo.qooxdoo.org/devel/demobrowser/#data~TreeController.html.
> > 2) Another controller to bind other fields and the selection of tree
> above
> > to my form model. I'm using the Object controller like is shown here:
> > http://demo.qooxdoo.org/devel/demobrowser/#data~Form.html
> >
> > <http://demo.qooxdoo.org/devel/demobrowser/#data~Form.html>but when it
> > comes
> > to add the tree selection to the form controller:
> >
> > controller.addTarget( myTree, "selection", "categories", true );
> >
> > I'm getting a "too much recursion". If I pass "false" as 4th parameter,
> It
> > works but changes made in the UI don't reflect to my model.
> >
> > Whats wrong?
> >
> >
> > On Fri, Aug 14, 2009 at 9:57 AM, MartinWittemann
> > <[email protected]>wrote:
> >
> >>
> >> Hi,
> >>
> >> if a list is in the form, the selection will be taken for serialization.
> >> Take a look at the Form demo in the data section to see how you can
> >> handle
> >> the selection of a SelectBox (which is like a list) and how you can
> >> serialize that.
> http://demo.qooxdoo.org/devel/demobrowser/#data~Form.html
> >> There are two ways to do it actually. The first way is in the demo right
> >> now
> >> and the new, second way will be online later the day.
> >>
> >> Bubble events can be very expensive with bug models so the default
> should
> >> be
> >> off. But its a good idea to add an argument and let the user choose if
> he
> >> wants to have the bubble events on. :)
> >>
> >> Best,
> >> Martin
> >>
> >>
> >> Krycek wrote:
> >> >
> >> > Hi Martin,
> >> > On Fri, Aug 14, 2009 at 3:33 AM, MartinWittemann
> >> > <[email protected]>wrote:
> >> >
> >> >>
> >> >> Hello Guilherme,
> >> >>
> >> >> its never too early to talk about things in development. Your
> >> questions
> >> >> brought up use cases I hadn't in mind jet.
> >> >> But now to your questions:
> >> >> 1) The List and the ListItems have te be created by the user using
> the
> >> >> form
> >> >> itself. So it should be no problem using the list controller to
> >> populate
> >> >> the
> >> >> list with ListItems and use that list in a form.
> >> >>
> >> >
> >> > Hmm, right. But still. The model that generates the ListItems may have
> >> a
> >> > lot
> >> > of properties, how to choose one to serialize? and what if I don't
> want
> >> to
> >> > serialize the list items, but its selection?
> >> >
> >> >
> >> >> 2) The form is not planed to support the tree or other huge wigets.
> We
> >> >> see
> >> >> a
> >> >> form containing the tipical form elements like Textfields, Spinners,
> >> ...
> >> >> The
> >> >> most complex widget in a form is a list or a radio group. You can see
> >> all
> >> >> supported widgets in the FormInvalids demo:
> >> >> http://demo.qooxdoo.org/devel/demobrowser/#ui~FormInvalids.html
> >> >> or in the documentation on the website:
> >> >> http://qooxdoo.org/documentation/0.8/ui_form_handling2#widgets
> >> >>
> >> >> We put on a demo showing the default use case of the form controller
> >> this
> >> >> evening. Perhaps you could take a look at that to get an idea of what
> >> it
> >> >> is
> >> >> supposed to do.
> >> >
> >> >
> >> > I saw that demo yesterday (a built it in my pc), my questions came
> from
> >> > that
> >> > demo.
> >> > About the Form Controller, line 103:
> >> >
> >> >      var model = qx.data.marshal.Json.createModel(data);
> >> >
> >> > I had to change that line to include the bubble event. Shouldn't those
> >> > events be fired by default?
> >> >
> >> >
> >> >>
> >> >> Best,
> >> >> Martin
> >> >
> >> >
> >>
> ------------------------------------------------------------------------------
> >> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> >> > 30-Day
> >> > trial. Simplify your report design, integration and deployment - and
> >> focus
> >> > on
> >> > what you do best, core application coding. Discover what's new with
> >> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> >> > _______________________________________________
> >> > qooxdoo-devel mailing list
> >> > [email protected]
> >> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://n2.nabble.com/Form-Controller-and-Form-Manager-Design-Questions-tp3440270p3444881.html
> >> Sent from the Q&A mailing list archive at Nabble.com.
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> >> 30-Day
> >> trial. Simplify your report design, integration and deployment - and
> >> focus
> >> on
> >> what you do best, core application coding. Discover what's new with
> >> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> >> _______________________________________________
> >> qooxdoo-devel mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >>
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > trial. Simplify your report design, integration and deployment - and
> focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Form-Controller-and-Form-Manager-Design-Questions-tp3440270p3464427.html
> Sent from the Q&A mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to