Perhaps I should have mentioned that I am using Tapestry 4.0.2. I did all you mentioned, but I keep getting the error message that the template for locale en_US can't be found. I am pretty sure it's no locale problem though, since Tapestry should find the default-template anyway.

Sample Library.

PingCommon.library:

<!DOCTYPE library-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";>

<library-specification>
<component-type type="AdapterContract" specification-path="AdapterContract.jwc"/>
</library-specification>


In the java package (/com/pingidentity/component/common/), copy in the .jwc, .html and .library.
Jar this up and put it on the classpath.

This goes into the .application file.
<library id="common" specification-path="/com/pingidentity/component/common/PingCommon.library"/>

Then you should be able to access it as "common:AdapterContract".

Does that help, if not, then maybe you could post some of your code?

regards,

Mark


Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tue 10/24/2006 10:07 AM
To: users@tapestry.apache.org
Subject: RE: defining paths for templates

I did create a library, in which I refer to the pages and jwc files
explicitly. This seems to aid finding the pages and components, but
not the templates. Somehow the search-rule of finding the templates
along with the components and pages in the same directory does not work.

I started out with all in the WEB-INF directory.  If you want to put
 the .html/.jwc files in the same directory as the .page you can,
Tapestry will find it automatically.  Then the .java file can be
anywhere, you just specify it's location in the .jwc.  That is the
simplest model.  A bit more complicated is to create sub-directories
 under the WEB-INF, then you have to tell Tapestry, via the
.application file where to find the components.

A more complicated, but more in line with the Tapestry Model is to
create libraries, like "contrib".  I started out with the simple
model and then needed to create libraries.  Eventually, I wanted to
create libraries, in order to do that I had to move everything around.

Creating libraries is pretty simple.  In the directory/package for
the .java, I put the .html and the .jwc.  I put a .library file and
jar it all together.  Then I include the .library in the
.application.  Then whenever, I want to reference one of my
components, I just prefix it like you would "contrib".

HTH,

Mark

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tue 10/24/2006 9:42 AM
To: users@tapestry.apache.org
Subject: defining paths for templates

The people in the project I'm in prefer to keep the java-sources and
tapestry files that belong together in one and the same directory
(Home.java together with Home.page en Home.html, for example). This
basically means that all Tapestry-files will be placed outside of
WEB-INF.

Now I finally succeded to get Tapestry to find the jwc and page files.
Alas, tapestry won't load the related templates. I even tried the
trick of using an asset, like this:

<asset name="$template" path="Home.html"/>

But this doesn't work either, as Tapestry complains about not being
able to find the html file on the class path. It also seems
superfluous to me, since tapestry is supposed to find the templates in
the same directory as the page or component files.

If anyone has any pointers, I'll be grateful.


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







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







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

Reply via email to