You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <p....@albourne.com> on 2006/11/06 09:04:08 UTC

Seperating component and page classes

Hi

I am trying to organize page and component classes into separate 
packages, but when I add the keys to the .application file, the 
framework can no longer find my assets (i.e.: the stylesheet and image 
assets) whic are Injected into my border component. What am I missing?

.application file:
<meta key="org.apache.tapestry.page-class-packages" 
value="com.albourne.web.pages"/>
<meta key="org.apache.tapestry.component-class-packages" 
value="com.albourne.web.components"/>

border component:
@Asset("context:/CSS/styles.css") //relative to the application context path
 public abstract IAsset getStyles();

Error:
Component Portfolio/$Border does not contain an asset named 'styles'.
binding:     org.apache.tapestry.binding.AssetBinding@6f0962[template 
parameter stylesheet, location=context:/WEB-INF/Border.html, line 1]
component:     $BaseComponent_1@ca1a93[Portfolio/$Border]
location:     context:/WEB-INF/Border.html, line 1

1    <html jwcid="@Shell" renderBaseTag="false" 
title="ognl:page.pageName" stylesheet="asset:styles" >
2    <head>
3    <title>Risk Model On The Web - Portfolio Analysis Application</title>
4    </head>
5    <body jwcid="@Body" >
6   

Thanks
Peter


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


Re: Seperating component and page classes

Posted by Peter Stavrinides <p....@albourne.com>.
I have managed to solve this, I didn't realize that any sub-packages 
need to be explicitly specified as a comma separated list.

Thanks
Peter

Peter Stavrinides wrote:
> Hi
>
> I am trying to organize page and component classes into separate 
> packages, but when I add the keys to the .application file, the 
> framework can no longer find my assets (i.e.: the stylesheet and image 
> assets) whic are Injected into my border component. What am I missing?
>
> .application file:
> <meta key="org.apache.tapestry.page-class-packages" 
> value="com.albourne.web.pages"/>
> <meta key="org.apache.tapestry.component-class-packages" 
> value="com.albourne.web.components"/>
>
> border component:
> @Asset("context:/CSS/styles.css") //relative to the application 
> context path
> public abstract IAsset getStyles();
>
> Error:
> Component Portfolio/$Border does not contain an asset named 'styles'.
> binding:     org.apache.tapestry.binding.AssetBinding@6f0962[template 
> parameter stylesheet, location=context:/WEB-INF/Border.html, line 1]
> component:     $BaseComponent_1@ca1a93[Portfolio/$Border]
> location:     context:/WEB-INF/Border.html, line 1
>
> 1    <html jwcid="@Shell" renderBaseTag="false" 
> title="ognl:page.pageName" stylesheet="asset:styles" >
> 2    <head>
> 3    <title>Risk Model On The Web - Portfolio Analysis 
> Application</title>
> 4    </head>
> 5    <body jwcid="@Body" >
> 6  
> Thanks
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

-- 
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. 



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