You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Christopher M. DeBracy" <ch...@debracy.net> on 2004/06/09 23:36:02 UTC

Tapestry Exentsions (ITemplateSourceDelegate)

Following Erik's suggestion, I'm trying to create an extension for my
application that implements ITemplateSourceDelegate. My .application file
contains the following:

<application name="DSH">
    
  <extension class="dsh.BorderDelegate"
name="org.apache.tapestry.template-source-delegate" immediate="yes"/>
  <library id="contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
  
</application>

Unfortunately, the "dsh.BorderDelegate" class never loads. 

While debugging, I noticed that in DefaultTemplateSource.java, the call to
"if (spec.checkExtension(Tapestry.TEMPLATE_SOURCE_DELEGATE_EXTENSION_NAME))"
(line 228) returns false, which to me indicates it never properly read in
the extension entry in the .application file.

The called function ends up in LibrarySpecification.java, which makes me
wonder if all my code must be wrapped in a <library-specification>, though
the docs indicate otherwise.

I'm probably missing something simple, but as I haven't been able to find
any examples of extensions, I'm slightly stuck at the moment.

Thanks,

Chris
 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Tapestry Exentsions (ITemplateSourceDelegate)

Posted by "Christopher M. DeBracy" <ch...@debracy.net>.
You nailed it. A couple of weeks ago I had a problem getting the
Examples.library to load. I didn't pursue at the time. 

Despite declaring the contrib library, I hadn't used it yet. I just now
tried it and got the same error. Double-checked my web.xml file and the
servlet names didn't match what I had been expecting.

Sheesh.

Thanks for the wake up call. I shall keep plugging along now that I the
extension is loading.

Now the fun can begin!

Chris

> -----Original Message-----
> From: Howard M. Lewis Ship [mailto:hlship@comcast.net] 
> Sent: Wednesday, June 09, 2004 4:52 PM
> To: 'Tapestry users'
> Subject: RE: Tapestry Exentsions (ITemplateSourceDelegate)
> 
> 
> With immediate=yes it should not wait until the template 
> source requests it. Anything odd on startup? Are you 
> ABSOLUTELY sure that Tapestry is pickup up the right 
> .applilcation file? You might want to enable some debug output.
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> 
> > -----Original Message-----
> > From: Christopher M. DeBracy [mailto:christopher@debracy.net]
> > Sent: Wednesday, June 09, 2004 5:36 PM
> > To: 'Tapestry users'
> > Subject: Tapestry Exentsions (ITemplateSourceDelegate)
> > 
> > 
> > Following Erik's suggestion, I'm trying to create an 
> extension for my 
> > application that implements ITemplateSourceDelegate. My 
> .application 
> > file contains the following:
> > 
> > <application name="DSH">
> >     
> >   <extension class="dsh.BorderDelegate" 
> > name="org.apache.tapestry.template-source-delegate" 
> immediate="yes"/>
> >   <library id="contrib" 
> > specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
> >   
> > </application>
> > 
> > Unfortunately, the "dsh.BorderDelegate" class never loads.
> > 
> > While debugging, I noticed that in
> > DefaultTemplateSource.java, the call to
> > "if 
> > (spec.checkExtension(Tapestry.TEMPLATE_SOURCE_DELEGATE_EXTENSI
> > ON_NAME))"
> > (line 228) returns false, which to me indicates it never 
> > properly read in
> > the extension entry in the .application file.
> > 
> > The called function ends up in LibrarySpecification.java,
> > which makes me
> > wonder if all my code must be wrapped in a 
> > <library-specification>, though
> > the docs indicate otherwise.
> > 
> > I'm probably missing something simple, but as I haven't been
> > able to find
> > any examples of extensions, I'm slightly stuck at the moment.
> > 
> > Thanks,
> > 
> > Chris
> >  
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Tapestry Exentsions (ITemplateSourceDelegate)

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
With immediate=yes it should not wait until the template source requests it. Anything odd on
startup? Are you ABSOLUTELY sure that Tapestry is pickup up the right .applilcation file? You might
want to enable some debug output.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


> -----Original Message-----
> From: Christopher M. DeBracy [mailto:christopher@debracy.net] 
> Sent: Wednesday, June 09, 2004 5:36 PM
> To: 'Tapestry users'
> Subject: Tapestry Exentsions (ITemplateSourceDelegate)
> 
> 
> Following Erik's suggestion, I'm trying to create an extension for my
> application that implements ITemplateSourceDelegate. My 
> .application file
> contains the following:
> 
> <application name="DSH">
>     
>   <extension class="dsh.BorderDelegate"
> name="org.apache.tapestry.template-source-delegate" immediate="yes"/>
>   <library id="contrib"
> specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
>   
> </application>
> 
> Unfortunately, the "dsh.BorderDelegate" class never loads. 
> 
> While debugging, I noticed that in 
> DefaultTemplateSource.java, the call to
> "if 
> (spec.checkExtension(Tapestry.TEMPLATE_SOURCE_DELEGATE_EXTENSI
> ON_NAME))"
> (line 228) returns false, which to me indicates it never 
> properly read in
> the extension entry in the .application file.
> 
> The called function ends up in LibrarySpecification.java, 
> which makes me
> wonder if all my code must be wrapped in a 
> <library-specification>, though
> the docs indicate otherwise.
> 
> I'm probably missing something simple, but as I haven't been 
> able to find
> any examples of extensions, I'm slightly stuck at the moment.
> 
> Thanks,
> 
> Chris
>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org