This content has been marked as final.
Show 4 replies
-
1. Re: Subdirectories in the view folder
tynor Jul 11, 2007 4:44 PM (in response to jbrosan)If you look at your jboss console output, you'll probably see that the page is unable to render since it can't follow one of its template links.
Check any template links on the page -- seam-gen generates relative links that look like this:template="layout/template.xhtml"> ... <s:decorate template="layout/display.xhtml">
If you move the page to a directory other than the root, you need to change those references to not be relative:template="/layout/template.xhtml"> ... <s:decorate template="/layout/display.xhtml">
(Seam developers: is there any reason why seam-gen should not generate with that leading slash? Such a reference works both in the oringinal location and tolerates page movement). -
2. Re: Subdirectories in the view folder
norman.richards Jul 11, 2007 7:31 PM (in response to jbrosan)There's no technical reason that I know of to prefer one to the other. As a matter of style, I prefer an absolute path for those things. In fact, I my preference is to put the templates off somewhere in /WEB-INF to really make things nice and clean.
<ui:composition template="/WEB-INF/template.xhtml">
or<ui:include src="/WEB-INF/incl/cart.xhtml" />
Unfortunately, this practice doesn't seem to have caught on, so people keep running into relative path problems and run the risk of unexpected things happening if someone tries to access the template instead of the real page. -
3. Re: Subdirectories in the view folder
jbrosan Jul 12, 2007 7:55 AM (in response to jbrosan)Thanks, I'll check out all of the template references. :)
-
4. Re: Subdirectories in the view folder
jbrosan Jul 12, 2007 9:40 AM (in response to jbrosan)Tynor,
The relative link to the template turned out to be the issue.
Thanks for the help, I really appreciate it.
-John