On Wed, May 13, 2009 at 8:37 AM, Neil Griffin <ngriffin(a)liferay.com> wrote:
Ed, Roger,
Regarding section 3.6.1.4 "A simple composite component example", the spec
reads:
>> Create the composite component markup page. In this case,
loginPanel.xhtml
>> resides in the ./resources/ezcomp directory relative to the index.xhtml
file.
I'm one of those guys who likes to have all his views in a sub-folder of
the context-path, something like this:
my-context-path/xhtml/index.xhtml
Anyways, I tried creating the following folder:
my-context-path/xhtml/resources/ezcomp
And Tomcat's FileDirContext.file() method checks for the existence of
"resources/ezcomp" relative to my-context-path, and not the index.xhtml
file.
So when I renamed the resources folder to this:
my-context-path/resources/ezcomp
Then my composite component started working. Not sure if this is true with
other servlet containers or app servers, but Tomcat doesn't seem to offer
any other option.
Neil, we were actually discussing that in another thread =>
http://archives.java.sun.com/cgi-bin/wa?A2=ind0904&L=JSR-314-OPEN&...
My point was a slight variation of yours. I'm concerned that these composite
component templates are exposed as public pages. I would prefer if we mirror
the resources directory under WEB-INF so that you can have both a public and
a private repository.
..but as it stands now, the folder name resources is hard-coded. As Ed
points out, you have to use a Facelets configuration file to relocate the
template.
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan
NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.