[Product-Developers] Multiple schema extensions on the same type
David Glick
davidglick at onenw.org
Thu Aug 7 14:42:49 UTC 2008
On Aug 7, 2008, at 4:53 AM, Hedley Roos wrote:
> Hi all
>
> Is it possible to extend say Document with both FooExtender and
> BarExtender using schema extender?
>
> The respective zcml is then
> <adapter factory=".foo.FooExtender"/> and
> <adapter factory=".bar.BarExtender"/>
>
> Both classes do "adapts(Document)".
>
> I find that only one extender wins in this case. Is there a smart
> way to
> register the adapters or should I change BarExtender to adapt
> FooExtender instead of Document?
Yes, just make sure you register the extenders as *named* adapters
with different names. (e.g. <adapter factory=".foo.FooExtender"
name="foo"/>)
David Glick
Project Associate
ONE/Northwest
New tools and strategies for engaging people in protecting the
environment
http://www.onenw.org
davidglick at onenw.org
(206) 286-1235 x32
Subscribe to ONEList, our email newsletter!
Practical advice for effective online engagement
http://www.onenw.org/full_signup
More information about the Product-Developers
mailing list