You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bulling <sp...@phoenix.hadiko.de> on 2006/03/15 19:50:06 UTC

.page/.html/.jwc in different directories

Hi everybody,

perhaps some of you have read about the problems I had (and still have)
following the howto under
http://wiki.apache.org/jakarta-tapestry/PagesAndComponentsInWEB-INF

As it seems I can put the .page and .jwc files in different (sub-)directories
of WEB-INF but then Tapestry can't find the corresponding templates. :(

So, for me the first question is: Who (besides Kent who tried to help me already -
thanks!) knows how to achieve this/what do I have to do to be able to put
.page/.jwc files in different directories?
Perhaps the author of the mentioned howto himself (because the howto doesn't
work in it's current version)?

The even better question (because more general):
Who knows how to be able to not only put .page and .jwc but also the .html
templates in a different directory?

I've tried to implement a custom ITemplateSourceDelegate (because IMHO
this seems to be the right place to start from) but I only get
NullPointerExceptions. :(

I don't want to only solve my own problem but I also want to extend the Wiki
afterwards so I would appreciate your help a lot. Thanks!

Sincerly,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
I encountered something very strange:
I've put the Border component with its template and the property files
under WEB-INF/components and normally Tapestry shouldn't be able
to find the .jwc file, right?! But in my custom SpecificationResolverDelegate
the method findComponentSpecification() is never called by Tapestry
(=> I can't define the template to be used by the component by hand
=> I get the error message that the template couldn't be found).

With the Home.page and all of it's related files it's different:
The method findPageSpecification() gets called and I can provide
a custom org.apache.hivemind.Resource to define the new html template
location.

Sincerly,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mär 2006 - 16:16:50, Andreas Andreou wrote:
| Border goes to /components ok.
| Home cannot go to /pages.
| 
| Perhaps it's the way the home service works?
| 
| So, you can put everything in the subfolders apart from the Home files

Thanks _a lot_ for your help and investigation! I'll try to change
this in my project, now ;-)

The only question that remains is if it's also possible to
put the html templates in a different subdirectory by
implementing a custom TemplateSourceDelegate. Perhaps
someone else knows that some day... ;)

Sincerly,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mär 2006 - 15:57:36, Andreas Bulling wrote:
| I was able to put all the "normal" pages in a pages subdirectory
| below WEB-INF (I also updated the Wiki page concerning the Home
| problem) but I'm not able to put my Border component below
| "components":
| [...]

It seems as if in all the cases where there is a component class
file it is not possible to put the corresponding .jwc/.html file
inside the componentes subdirectory. :-(

Does someone know how to fix this?

Sincerly,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mär 2006 - 16:16:50, Andreas Andreou wrote:
| Border goes to /components ok.
| Home cannot go to /pages.

I was able to put all the "normal" pages in a pages subdirectory
below WEB-INF (I also updated the Wiki page concerning the Home
problem) but I'm not able to put my Border component below
"components":

---
Could not find template for component Home/$Border in locale de.
---

In Home.html I have
	<body jwcid="border@Border">
Do I have to change that to
	<body jwcid="border@components/Border">
of if not how are you using your Border component within
your Home.html file?

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Andreou <an...@di.uoa.gr>.
Border goes to /components ok.
Home cannot go to /pages.

Perhaps it's the way the home service works?

So, you can put everything in the subfolders apart from the Home files

Andreas Bulling wrote:

>| These are directly in WEB-INF.
>| Do you want me to move them int /pages and /components and see if it works?
>
>That would be great - thanks! ;)
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
| These are directly in WEB-INF.
| Do you want me to move them int /pages and /components and see if it works?

That would be great - thanks! ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Andreou <an...@di.uoa.gr>.

Andreas Bulling wrote:

>On 16. Mär 2006 - 15:37:25, Andreas Andreou wrote:
>| the structure i tested was:
>| 
>| WEB-INF
>| \pages (contains *.page + *.html + *.properties)
>| \components (contains *.jwc + *.html + *.properties)
>
>Also Home.[page|html|properties] and Border.[jwc|html|properties]?
>  
>
These are directly in WEB-INF.
Do you want me to move them int /pages and /components and see if it works?

>Did you change the hivemind configuration?
>  
>
no

>Andreas
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mär 2006 - 15:37:25, Andreas Andreou wrote:
| the structure i tested was:
| 
| WEB-INF
| \pages (contains *.page + *.html + *.properties)
| \components (contains *.jwc + *.html + *.properties)

Also Home.[page|html|properties] and Border.[jwc|html|properties]?
Did you change the hivemind configuration?

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Andreou <an...@di.uoa.gr>.
the structure i tested was:

WEB-INF
\pages (contains *.page + *.html + *.properties)
\components (contains *.jwc + *.html + *.properties)



Andreas Bulling wrote:

>On 16. Mär 2006 - 15:15:45, Andreas Andreou wrote:
>| Just tried, and
>| the code from the Wiki works for me.
>
>Hm... good for you, bad for me ;)
>
>Just to make clear:
>You've put the .page files in a subdirectory below WEB-INF
>and .jwc files in another one below WEB-INF?
>What about the html templates/the properties files?
>
>Did you also put the Home.page/Border.jwc (if you have
>a Border component at all) in there?
>
>| I configured the delegate using hivemind
>
>Also just by cutting/pasting the configuration from the wiki?
>
>Thanks for your reply!
>  Andreas
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mär 2006 - 15:15:45, Andreas Andreou wrote:
| Just tried, and
| the code from the Wiki works for me.

Hm... good for you, bad for me ;)

Just to make clear:
You've put the .page files in a subdirectory below WEB-INF
and .jwc files in another one below WEB-INF?
What about the html templates/the properties files?

Did you also put the Home.page/Border.jwc (if you have
a Border component at all) in there?

| I configured the delegate using hivemind

Also just by cutting/pasting the configuration from the wiki?

Thanks for your reply!
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Adam Zimowski <zi...@gmail.com>.
Great. I'm gonna try it then.

On 3/16/06, Andreas Bulling <sp...@phoenix.hadiko.de> wrote:
> On 16. Mär 2006 - 07:32:58, Adam Zimowski wrote:
> | Does anybody know if there are performance implications associated
> | with this solution? Is the lookup cached, or executed every time?
>
> The API documentation states that the specification gets cached at least
> in T4.
>
> Sincerly,
>   Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mär 2006 - 07:32:58, Adam Zimowski wrote:
| Does anybody know if there are performance implications associated
| with this solution? Is the lookup cached, or executed every time?

The API documentation states that the specification gets cached at least
in T4.

Sincerly,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Adam Zimowski <zi...@gmail.com>.
Does anybody know if there are performance implications associated
with this solution? Is the lookup cached, or executed every time?

On 3/16/06, Andreas Andreou <an...@di.uoa.gr> wrote:
> Just tried, and
> the code from the Wiki works for me.
>
> I configured the delegate using hivemind
>
>
> Andreas Bulling wrote:
>
> >On 16. Mär 2006 - 03:57:08, andyhot@di.uoa.gr wrote:
> >| Well, using the code from the wiki, you can get to this
> >| structure
> >| WEB-INF
> >| \pages (*.page + *.html + *.properties)
> >| \components (*.jwc + *.html + *.properties)
> >
> >That's what I did but I still get the error message:
> >---
> >Could not find template for component Home/border in locale de.
> >---
> >What's missing here: The template for Home or for my Border component?
> >
> >Is someone out there who can tell that the code from the Wiki works?
> >I really would like to know that because it doesn't work for me
> >even by doing direct cut and paste without any modifications. Just
> >to make sure that the code works at all...
> >
> >| Anyway, if the wiki code isn't working for you, are you by any chance
> >| using windows? I believe there might be a file separator issue on that
> >| code.
> >
> >No, I'm using Linux...
> >
> >Does anybody know if I have to provide a custom TemplateSourceDelegate?
> >
> >Thanks!
> >  Andreas
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Andreou <an...@di.uoa.gr>.
Just tried, and
the code from the Wiki works for me.

I configured the delegate using hivemind


Andreas Bulling wrote:

>On 16. Mär 2006 - 03:57:08, andyhot@di.uoa.gr wrote:
>| Well, using the code from the wiki, you can get to this 
>| structure
>| WEB-INF
>| \pages (*.page + *.html + *.properties)
>| \components (*.jwc + *.html + *.properties)
>
>That's what I did but I still get the error message:
>---
>Could not find template for component Home/border in locale de.
>---
>What's missing here: The template for Home or for my Border component?
>
>Is someone out there who can tell that the code from the Wiki works?
>I really would like to know that because it doesn't work for me
>even by doing direct cut and paste without any modifications. Just
>to make sure that the code works at all...
>
>| Anyway, if the wiki code isn't working for you, are you by any chance
>| using windows? I believe there might be a file separator issue on that 
>| code.
>
>No, I'm using Linux...
>
>Does anybody know if I have to provide a custom TemplateSourceDelegate?
>
>Thanks!
>  Andreas
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 16. Mär 2006 - 03:57:08, andyhot@di.uoa.gr wrote:
| Well, using the code from the wiki, you can get to this 
| structure
| WEB-INF
| \pages (*.page + *.html + *.properties)
| \components (*.jwc + *.html + *.properties)

That's what I did but I still get the error message:
---
Could not find template for component Home/border in locale de.
---
What's missing here: The template for Home or for my Border component?

Is someone out there who can tell that the code from the Wiki works?
I really would like to know that because it doesn't work for me
even by doing direct cut and paste without any modifications. Just
to make sure that the code works at all...

| Anyway, if the wiki code isn't working for you, are you by any chance
| using windows? I believe there might be a file separator issue on that 
| code.

No, I'm using Linux...

Does anybody know if I have to provide a custom TemplateSourceDelegate?

Thanks!
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by an...@di.uoa.gr.
Well, using the code from the wiki, you can get to this 
structure
WEB-INF
\pages (*.page + *.html + *.properties)
\components (*.jwc + *.html + *.properties)

AFAIK the template should be near its spec (if there is one)
but the spec can contain a special asset (named '$template')
that overrides this (of course you'ld have to define this asset in every
.page or .jwc).

Anyway, if the wiki code isn't working for you, are you by any chance
using windows? I believe there might be a file separator issue on that 
code.

>From Andreas Bulling <sp...@phoenix.hadiko.de>:

> On 15. Mδr 2006 - 21:11:17, Andreas Andreou wrote:
> | Could you please describe the directory structure that
> | you want to achieve?
> 
> Sure:
> WEB-INF
>     \- pages (*.page)
>     \- components (*.jwc)
>     \-templates (*.html)
> 
> Sincerly,
>   Andreas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 


-- 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 15. Mär 2006 - 21:11:17, Andreas Andreou wrote:
| Could you please describe the directory structure that
| you want to achieve?

Sure:
WEB-INF
    \- pages (*.page)
    \- components (*.jwc)
    \-templates (*.html)

Sincerly,
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: .page/.html/.jwc in different directories

Posted by Andreas Andreou <an...@di.uoa.gr>.
Could you please describe the directory structure that
you want to achieve?

Andreas Bulling wrote:

>Hi everybody,
>
>perhaps some of you have read about the problems I had (and still have)
>following the howto under
>http://wiki.apache.org/jakarta-tapestry/PagesAndComponentsInWEB-INF
>
>As it seems I can put the .page and .jwc files in different (sub-)directories
>of WEB-INF but then Tapestry can't find the corresponding templates. :(
>
>So, for me the first question is: Who (besides Kent who tried to help me already -
>thanks!) knows how to achieve this/what do I have to do to be able to put
>.page/.jwc files in different directories?
>Perhaps the author of the mentioned howto himself (because the howto doesn't
>work in it's current version)?
>
>The even better question (because more general):
>Who knows how to be able to not only put .page and .jwc but also the .html
>templates in a different directory?
>
>I've tried to implement a custom ITemplateSourceDelegate (because IMHO
>this seems to be the right place to start from) but I only get
>NullPointerExceptions. :(
>
>I don't want to only solve my own problem but I also want to extend the Wiki
>afterwards so I would appreciate your help a lot. Thanks!
>
>Sincerly,
>  Andreas
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org