• 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: Subclassing WOImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing WOImage


  • Subject: Re: Subclassing WOImage
  • From: Pierre Frisch <email@hidden>
  • Date: Sat, 15 Nov 2003 09:12:41 -0800

You cannot subclass Apple dynamic elements. They are declared in com.webobjects.appserver._private.

You can very easily rewrite an Image tag that will do what you need I have done it many times. Create a component. In the html you just have one declaration <webobject name="myImage"></webobject> and in the wod you use a WOGenericElement:

myImage: WOGenericElement {
    elementName = "img";
    src = myImagePath;
    border = "0";
    alt = myAltString;
    height = myImageHeight;
    width = myImageWidth;
}

You can get the path by invoking urlForResourceNamed() in the ResourceManager. The only problem is finding the size of the image. To make this work I have to rewrite an image info reader. There is one in com.webobjects.appserver._private but it is as the name implies private.

Pierre

On Saturday, November 15, 2003, at 03:15  AM, Greg Hulands wrote:

Hi,
I am wanting to subclass WOImage so that I can intercept the URL being generated and return something different based on the parameters supplied. I cannot for the life of me find where WOImage is declared so that I can do this.


Can anyone provide me with any help?

Any help is greatly appreciated.

Regards,
Greg
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Subclassing WOImage
      • From: Geoff Hopson <email@hidden>
References: 
 >Subclassing WOImage (From: Greg Hulands <email@hidden>)

  • Prev by Date: Re: Subclassing WOImage
  • Next by Date: Re: Pb updating a to-many relationship with refaultAllObjects()
  • Previous by thread: Re: Subclassing WOImage
  • Next by thread: Re: Subclassing WOImage
  • Index(es):
    • Date
    • Thread