• 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: Extending components but using binding and html of parent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extending components but using binding and html of parent


  • Subject: Re: Extending components but using binding and html of parent
  • From: Farrukh Ijaz <email@hidden>
  • Date: Mon, 5 Jul 2010 18:01:03 +0300

Great! This is exactly what I was looking for.

Thanks Chuck!

Sent from my iPad

On 05-Jul-2010, at 4:43 PM, Chuck Hill <email@hidden> wrote:

>    /**
>     * Allows a component to "inherit" the template (.html and .wod files) from another component.
>     * <p>Usage:</p>
>     * <pre>
>     * public WOElement template() {
>     *     return inheritTemplateFrom("AddAddress", "CoreUI");
>     * }
>     * </pre>
>     * This very simple implementation does have some limitations:
>     * <ol>
>     * <li>It can't he used to inherit the template of another component inheriting a template.</li>
>     * <li>It can't handle having two components with the same name in different packages</li>
>     * <li>It does not use WO template caching</li>
>     * </ol>
>     *
>     * @see com.webobjects.appserver.WOComponent#template()
>     *
>     * @param componentName the name of the component whose template will be inherited
>     * @param frameworkName name of the framework the component is in, or null if in the application
>     * @return the template form the indicated component
>     */
>    public WOElement inheritTemplateFrom(String componentName, String frameworkName)
>    {
>        String componentPath = componentName + ".wo/" + componentName + ".";
>        String htmlString = ResourceManagerAdditions.stringFromResource(componentPath + "html", null, session().languages());
>        String wodString = ResourceManagerAdditions.stringFromResource(componentPath + "wod", null, session().languages());
>        return WOComponent.templateWithHTMLString(htmlString, wodString, session().languages());
>    }
>
>
>
> On Jul 5, 2010, at 2:07 AM, Farrukh Ijaz wrote:
>
>> Hi,
>>
>> How can I extend an existing component to override java methods and introduce new interfaces to the java class of the component but use the binding and html part of it's parent? Let's say I want to override the ERModernLook but I need to introduce some interfaces to it become compatible with my existing application?
>>
>> Is it possible?
>>
>> Farrukh _______________________________________________
>> 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
>
> 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
 _______________________________________________
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: 
 >Extending components but using binding and html of parent (From: Farrukh Ijaz <email@hidden>)
 >Re: Extending components but using binding and html of parent (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Extending components but using binding and html of parent
  • Next by Date: Re: A fetch throws a java.lang.NullPointerException on a sub-record
  • Previous by thread: Re: Extending components but using binding and html of parent
  • Next by thread: OT: JPEG EXIF Image Orientation
  • Index(es):
    • Date
    • Thread