Skip to main content

Extending the Advertisement Class

1 reply [Last post]
aymanshargawi
Offline
Joined: 2009-05-31

Anyone can help with how to let the AdvertisementFactory class register the new Advertisement Type I am creating through extending the Advertisement class.

I tried that through calling the AdvertisementFactory static register method as follows:

AdvertisementFactory.registerAdvertisementInstance(AdvertisementMyOwn.getAdvertisementType()
,
new AdvertisementMyOwn.Instantiator());

AdvertisementMyOwn advOwn = new AdvertisementMyOwn();

I made sure that the above line run at least once bofore the new advertisement class is being instantianted, however, still the AdvertisementFactory complains with an error message that the type of the class being instantiated is not recognized.

Any idea?

Thanks and regards,

Ayman

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adamman71
Offline
Joined: 2007-01-31

I have provided a code example downloadable at www.practicaljxta.com.

J.