• 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: Generic conditional WOHyperlink
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generic conditional WOHyperlink


  • Subject: Re: Generic conditional WOHyperlink
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 13 Mar 2007 09:58:41 -0700

Hi David,

On Mar 12, 2007, at 3:41 PM, David Holt wrote:

I added the homeTab binding to WOHyperlink bind it to a String.

Now you lost me. Why did you do that? What are you trying to achieve?

Trying to set the cssClass programmatically based on whether homeTab == currentTab or not

Think top down not bottom up.


homeTab always resolves to null so the isOnTab() method always resolves to false.

OK, let me try to understand this. You have something like this in your WOD?


SomeLink: WOHyperlink {
    action = something;
    class = cssClass;
    homeTab = "Inventory";
}

Yes that is exactly it.


Is that right? This is going to produce this html:
<a href="...." class="subnav" homeTab = "Inventory">...</a>
It is NOT going to set homeTab on the parent class to "Inventory" if that is what you were thinking.

You are correct. This is why I was trying to have a generic wrapper for the link to include the "hometab" information there. But that doesn't work either ;-)

Nope. Binding synch goes down, not up. It is used to migrate parent values into the children and then child updates to that value back into the parent at the end of the RR phase. Just like in real life, children don't tell their parents.



Or am I totally off track?

You have understood me perfectly. That what I want to do is nuts, is another thing altogether!

:-) I don't have any quick fix. What I can tell you is that your design is upside down. You tell WOHyperlinks what to do, they don't tell you. You need to keep the menu structure and context at a higher level and push the relevant contextual information down to the hyperlinks which will render it in HTML.


Chuck

--

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


  • Follow-Ups:
    • Re: Generic conditional WOHyperlink
      • From: David Holt <email@hidden>
References: 
 >Generic conditional WOHyperlink (From: David Holt <email@hidden>)
 >Re: Generic conditional WOHyperlink (From: Chuck Hill <email@hidden>)
 >Re: Generic conditional WOHyperlink (From: David Holt <email@hidden>)
 >Re: Generic conditional WOHyperlink (From: Chuck Hill <email@hidden>)
 >Re: Generic conditional WOHyperlink (From: David Holt <email@hidden>)

  • Prev by Date: Another rowDiffsForAttributes!
  • Next by Date: Re: Another rowDiffsForAttributes!
  • Previous by thread: Re: Generic conditional WOHyperlink
  • Next by thread: Re: Generic conditional WOHyperlink
  • Index(es):
    • Date
    • Thread