Is it possible in tapestry - assets at runtime?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible in tapestry - assets at runtime?

Tomas Jucius
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Erik Hatcher

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: [hidden email]
For additional commands, e-mail: [hidden email]