- This topic has 20 replies, 4 voices, and was last updated 19 years, 2 months ago by glongman.
-
AuthorPosts
-
glongmanMemberAhh, I missed a little detail in the first report and now the new report by rooserboy has illuminated the problem. Both of you are trying to place a .library file in the web context path (paths like WEB-INF/review-components and WEB-INF/components). But, Tapestry only allows libraries to reside in the classpath.
The paths passed to <library name=”foo” specification-path=”/foo’/> are resolved by Tapestry relative to the project classpath (ie. in the source folders).
So if I have a package com.myfoo
and I put MyFoo.library in there…<library name=”Foo” specification-path=”/com/myfoo/MyFoo.library”/>
and I would place the pages and component in the same package, com.myfoo
In case you have the book “Tapestry In Action”, libraries are described at Chapter 6.9 “Packaging components into libraries” starting on page 261.
Geoff
rooserboyMemberYeah I have the book and I read that. Since my components (meaning the HTML and jwc files) were in WEB-INF/components, that’s where I decided to put my custom library file so that the library would find all the components in the same location, which it does.
I don’t have a Tapestry runtime problem, but an IDE problem. I suppose that the dir structure I am using may work by accident, but I think I have seen a lot of examples that use the same approach.
I just ignore the IDE errors regarding this.
rooserboyMemberUpdate:
I put my custom library file in the src with the java src for the components (which then gets moved to WEB-INF/classes/….). I did a shift-Cntrl in the application file and it found my library and the IDE errors went away.
But when I deployed the application, I got errors saying that my custom components could not be found.
I also tried modifying my custom library file to explicitly reference each component (following the example of contrib, but then I got error in the specification-paths. Doing a shift-Cntrl showed a list of components, but only the regular tapestry ones and contrib. My custom ones weren’t listed. I don’t want to have to explicitlyevery component, so I don’t want to go down this path anyway.
I suppose I could be doing something wrong with Tapestry, but they original way I was doing it was the easiest. It’s just that I got IDE errors.
glongmanMember@rooserboy wrote:
Update:
I put my custom library file in the src with the java src for the components (which then gets moved to WEB-INF/classes/….). I did a shift-Cntrl in the application file and it found my library and the IDE errors went away.
But when I deployed the application, I got errors saying that my custom components could not be found.
I also tried modifying my custom library file to explicitly reference each component (following the example of contrib, but then I got error in the specification-paths. Doing a shift-Cntrl showed a list of components, but only the regular tapestry ones and contrib. My custom ones weren’t listed. I don’t want to have to explicitlyevery component, so I don’t want to go down this path anyway.
I suppose I could be doing something wrong with Tapestry, but they original way I was doing it was the easiest. It’s just that I got IDE errors.
ok, I’m confused. Something is going on here and I’m not unwilling to lay the blame on the Spindle implementation. I’ll give this a hard look asap.
Geoff
rooserboyMemberDon’t spend too much time on it on my account. But thanks!
glongmanMember@rooserboy wrote:
Don’t spend too much time on it on my account. But thanks!
I found the problem. Seems I missed something in the way that library specs are resolved. Working the problem, no eta for a fix at this time.
-
AuthorPosts