RE: Question about extend a WO component

From: Federico Hernandez (fhernande..oslabs.com)
Date: Wed Dec 05 2007 - 09:41:37 EST

  • Next message: Alex Cone: "Re: Q commit privileges"

    Sorry, I'm select the wrong list

    Federico

    -----Original Message-----
    From: Lachlan Deck [mailto:lachlan.dec..mail.com]
    Sent: Martes, 04 de Diciembre de 2007 08:11 p.m.
    To: woproject-de..bjectstyle.org
    Subject: Re: Question about extend a WO component

    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 : Wed Dec 05 2007 - 09:42:09 EST