Re: Question about extend a WO component

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Tue Dec 04 2007 - 21:11:23 EST

  • Next message: Mike Schrag: "Q commit privileges"

    On 05/12/2007, at 12:00 PM, Federico Hernandez wrote:

    > Hi

    (Note: this is not specific to woproject-dev. webobjects-
    de..ists.apple.com would be fine for this question)

    > If I have a WO component and I need a similar component, only with
    > some
    > changes in its HTML.
    >
    > I have to create a second component, its Java file extends the
    > first one and
    > change the HTML as required.
    >
    > Question: is there a way to allow me create only another .wo and
    > use the
    > same Java file in the first component?

    Yep, although it'll depend on whether the shared html wraps the non-
    shared content or not.

    But it sounds like you want a PageWrapper component that has the bulk
    of your content and then within that PageWrapper you'll include the
    other component via:

    <webobject name="SpecificContent"/>

    SpecificContent : WOComponentContent {
    }

    ---------------------------------------

    Now in your custom pages, have in your html:
    <webobject name="PageWrapper">
            // your custom content goes here
    </webobject>

    And in your wod file:
    PageWrapper : PageWrapper {
    }

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Tue Dec 04 2007 - 21:12:58 EST