Hi,

I didn't setup any tapestry libraries yet, but I can recommend "Enjoying Web 
Development with Tapestry" (available as PDF eBook). There's a complete 
description on how to set up your project as library.

Grz
Andi


-----Ursprüngliche Nachricht-----
Von: Tony Giaccone [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 13. März 2008 01:37
An: users@tapestry.apache.org
Betreff: Tapestry 4.0 Creating a Tapestry Library

Quick Overview:

I want to create a set of pages that implement a common reporting feature set 
that I'm going to use in 2, possibly more, different applications.  It would 
seem like creating a tapestry library, much like the Contrib library, to use in 
our applications would be a good thing.

I've tried to set this up by looking at the Contrib library and modeling that 
set up, but I'm getting the following error:

No object provider exists for prefix 'ReportLibrary'.


Gory Details:


I created a simple eclipse maven project, who's output is a jar file.

In that project I've included a java class


com.company.project.reportlibrary.pages.ReportStub.java

In that same folder are:

ReportStub.html
ReportStub.page

In addition I've created a Report.library file that contains the following
info:

<library-specification>
  <meta key="org.apache.tapestry.component-class-packages"
         value="com.company.project.reportlibrary.pages"/>
   <page name="ReportStub" specification-path="pages/ReportStub.page"/>
</library-specification>

All this is complied up and placed in a jar file. The jar file is then included 
with the simple report servlet.

next I added the following line to  libserve.application.

    <library id="ReportLibrary"
specification-path="/com/company/project/reportlibrary/Report.library" />


Finally in the Home.page file I placed the following entry:

<inject property="reportStub" object="ReportLibrary:ReportStub" />


When I hit the home page, libserve/app the process chugs for quite a while then 
I get the following error:


Error at context:/WEB-INF/Home.page, line 7, column 72: Error adding property 
reportStub to class com.company.project.pages.Home: Error at 
context:/WEB-INF/Home.page, line 7, column 72: No object provider exists for 
prefix 'ReportLibrary'.


So I'm guessing I need to do something with the HiveMind, but I'm clueless as 
to what.  I see that the contrib stuff has a META-INF/hivemodule.xml file and 
I've looked at it, but it's not at all clear what I should do to get my stuff 
working.


Anyone care to point me in the right direction?


Tony

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to