You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tomas Jucius <en...@gmail.com> on 2005/05/19 11:07:35 UTC

Is it possible in tapestry - assets at runtime?

I explain situation:

Have menu items - component. 
All items are defined in *.properties file.. 

In that file I define:
page name(tapestry page name), title(title for user), icon (icons that
wraps link)...

All menu items are components what take asset..


So is there any solution without defining all these assets in menu component???

Or I have to do it twice in properties file and in *.page file?

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


Re: Is it possible in tapestry - assets at runtime?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 19, 2005, at 5:07 AM, Tomas Jucius wrote:

> I explain situation:
>
> Have menu items - component.
> All items are defined in *.properties file..
>
> In that file I define:
> page name(tapestry page name), title(title for user), icon (icons that
> wraps link)...
>
> All menu items are components what take asset..
>
>
> So is there any solution without defining all these assets in menu  
> component???
>
> Or I have to do it twice in properties file and in *.page file?

IAsset implementing classes can be created dynamically.  Depending on  
where your assets are, you'll construct either a ContextAsset or an  
ExternalAsset for these menu icons.  Just make getter(s) for them and  
reference them as an ognl expression rather than through the assets  
collection.

     Erik


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