Re: Multiple Calls to Bound Action in Request-Response
Re: Multiple Calls to Bound Action in Request-Response
- Subject: Re: Multiple Calls to Bound Action in Request-Response
- From: Carter Wojcik <email@hidden>
- Date: Thu, 21 Dec 2006 13:36:19 -0800 (PST)
Thanks Chuck for pointing me in the right direction.
Seems to be working now in my test and just have to
move to the logic to my application and make sure it
continues to work.
After looking at your example code, it took me a
little while to figure out that I needed to put the
pushValuesToParent method in my component. The
bindings were being synchronized down, but the boolean
for the conditional was not being pushed to the
parent. This was fixed once I added the push method.
Thanks again for the help.
Carter
--- Chuck Hill <email@hidden> wrote:
> See page 206, Manual Synchronization, bullet point
> 3. I think that
> is what you are hitting and the solutions is also
> found in that section.
>
> Chuck
>
> On Dec 19, 2006, at 8:43 AM, Carter Wojcik wrote:
>
> > Hi All -
> >
> > I have a page containing a custom component
> > (TabComponent). The TabComponent contains an
> > ObjectComponent. The ObjectComponent contains a
> > ButtonComponent. The TabComponent is wrapped in a
> > conditional.
> >
> > When the user wants to add a record they push a
> > button, which flags the conditional as true and
> > displays the TabComponent. The user selects the
> > objects to add from a list and then presses an
> 'Add'
> > button which calls a method (addAction) located on
> the
> > page. Inside the addAction, the conditional is
> set to
> > false, to hide the TabComponent once objects are
> > added.
> >
> > Initially I was having issues with synchronizing
> the
> > conditional on the page, but following advice from
> > Chuck's book and overriding appendToResponse with
> an
> > additional boolean has solved that problem.
> >
> > Now the problem seems to be that my addAction is
> being
> > called multiple times in the Request-Response
> loop.
> > This causes the conditional to be set to false and
> the
> > TabComponent is hidden. I would only like the
> > TabComponent to be hidden under certain
> circumstances,
> > such as 'Cancel' button pressed or 'Add' button
> > pressed.
> >
> > Is there an alternate way to limit when the
> addAction
> > is called? Or a different place to put my logic so
> > that the addAction is not always called?
> >
> > Thanks for the help.
> >
> > Carter
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > Do not post admin requests to the list. They will
> be ignored.
> > Webobjects-dev mailing list
> (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
>
>
> > 40global-village.net
> >
> > This email sent to email@hidden
> >
>
> --
>
> Practical WebObjects - for developers who want to
> increase their
> overall knowledge of WebObjects or who are trying to
> solve specific
> problems.
>
http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden