• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOSwitchComponent question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOSwitchComponent question


  • Subject: Re: WOSwitchComponent question
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 13 Jul 2009 22:00:35 -0700


On Jul 13, 2009, at 9:44 PM, J Stephanos wrote:

Chuck:

> NSLog.out.appendln(new RuntimeException());

This is a cool idea. :-)

That is one I use often when trying to track down odd behavior.


> If I understand your description, this is normal. One call is from the invokeAction phase and one from appendToReponse.

This is exactly the case. Also, I was calling another method from within componentName (which was getting executed twice). Refactored it. Things are fine again. :-)

Thank you, for yet another insightful answer.

I think we have all been bitten by that, at least once.

Chuck



On Mon, Jul 13, 2009 at 11:26 PM, Chuck Hill <chill@global- village.net> wrote:

On Jul 13, 2009, at 5:49 PM, J Stephanos wrote:


I am using a WOSwitchComponent to select the relevant component to be displayed via hyperlinks. componentName is a method that returns the component name.


<wo:WOSwitchComponent WOComponentName = "$componentName" />

On clicking the link for the first time, everything works great. Any subsequent clicks shows some odd behaviour - the componentName method starts getting called twice - why is that?

Ask it to tell you.  Add this line:

NSLog.out.appendln(new RuntimeException());



This results in the component being displayed twice (as seen from the logs).

But not on the page?

If I understand your description, this is normal. One call is from the invokeAction phase and one from appendToReponse. If you have a form, you will see a third call during takeValues. The bindings are synchronized during each phase.


Chuck

Parent Component

  [x]Hyperlink1   HyperLink 2

  ------------------------------------------------------
 |    sub component 1                                  |
 -------------------------------------------------------

Any ideas/suggestions on what I am doing wrong?

Using WO 5.4.3 + Wonder.

--JSt
_______________________________________________
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

--
Chuck Hill             Senior Consultant / VP Development

Learn WO at WOWODC'09 East in Montréal this August!
http://www.wocommunity.org/wowodc09/east

http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars



-- Chuck Hill Senior Consultant / VP Development

Learn WO at WOWODC'09 East in Montréal this August!
http://www.wocommunity.org/wowodc09/east

http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars

_______________________________________________
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


References: 
 >WOSwitchComponent question (From: J Stephanos <email@hidden>)
 >Re: WOSwitchComponent question (From: Chuck Hill <email@hidden>)
 >Re: WOSwitchComponent question (From: J Stephanos <email@hidden>)

  • Prev by Date: Re: WOSwitchComponent question
  • Next by Date: Re: Little help with a qualifier
  • Previous by thread: Re: WOSwitchComponent question
  • Next by thread: multiple selections in an AjaxSelectionList or in general?
  • Index(es):
    • Date
    • Thread