• 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: Access to a surrounding component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access to a surrounding component


  • Subject: Re: Access to a surrounding component
  • From: Stefan Klein <email@hidden>
  • Date: Tue, 28 Sep 2010 22:59:19 +0200

Here are the relevant Components.
What i try is to get the "className" binding down to the AccordionTab components.


(If className in Accordion is not a binding it will be generated in Accordion)

Stefan

----------------------------------------
NavLeft.html

<webobject name = "Accordion">
<webobject name = "AT1">bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />
</webobject>
<webobject name = "AT2">bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />
</webobject>
<webobject name = "AT3">bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />bla<br />
</webobject>
</webobject>



NavLeft.wod

Accordion : Accordion {
    id = "Accordion";
}

AT1 : AccordionTab {
  title = "Tab1";
}

AT2 : AccordionTab {
  title = "Tab2";
}

AT3 : AccordionTab {
  title = "Tab3";
}

----------------------------------------
Accordion.html

<webobject name="Accordion">
<webobject name="Contents" />
</webobject>

Accordion.html

Contents: WOComponentContent {
}

Accordion: WOGenericContainer {
    elementName = "div";
    id = accordionID;
    class = className;
}

----------------------------------------
AccordionTab.html

<webobject name = "TitleDiv"><webobject name = "Title"></webobject></webobject>
<webobject name = "ContentDiv">
<webobject name = "Content"></webobject>
</webobject>


AccordionTab.wod

Title : WOString {
    value = ^title;
}

ContentDiv : WOGenericContainer {
    elementName = "div";
    id = contentID;
    class = contentClass;
}

TitleDiv : WOGenericContainer {
    elementName = "div";
    id = headerID;
    class = toggleClass;
}

Content : WOComponentContent {
}

Am 28.09.10 22:47, schrieb Timo Hoepfner:
Pass it via bindings... A bit more context would make it easier to help you... :)

Timo

Am 28.09.2010 um 22:33 schrieb Stefan Klein:

Hi,

my problem is not to access the 'parent'.
I had a component in an WOComponentContent and need access direct to the surrounding component.

page
    compA
        compB
           compC
           compD
           compE
    compZ

compC to comE need values from compB.

(Arrgh, i think my English is not good enough to explain that) :-P .

Stefan


Am 28.09.10 22:26, schrieb Farrukh Ijaz:
Hi

use ^ instead of $ in your bindings.

Farrukh

On 2010-09-28, at 11:24 PM, Stefan Klein wrote:

Hi,

is there anyway to access the surrounding component.

Example :

<wo: comp1>
<wo comp2 />
</wo>

Is there anyway for comp2 to find com1 ?

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

_______________________________________________
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: 
 >Access to a surrounding component (From: Stefan Klein <email@hidden>)
 >Re: Access to a surrounding component (From: Farrukh Ijaz <email@hidden>)
 >Re: Access to a surrounding component (From: Stefan Klein <email@hidden>)
 >Re: Access to a surrounding component (From: Timo Hoepfner <email@hidden>)

  • Prev by Date: Re: Access to a surrounding component
  • Next by Date: Re: Access to a surrounding component
  • Previous by thread: Re: Access to a surrounding component - Stop thinking about that
  • Next by thread: Re: Access to a surrounding component
  • Index(es):
    • Date
    • Thread