You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Audrius Peseckis <au...@ivs.lt> on 2005/11/28 12:56:06 UTC

List of assets using OGNL

Hello,

I'm trying to create an arrayList of css files to use it in my Shell component. Is it possible to create an array of assets, which would be used in Shell component only using ognl expressions. Something like:

<property name="styles" initial-value="ognl:java.util.ArrayList()" />
<asset name="style" path="styles/screen.css" property="ognl:styles.add(asset('style'))" />

<component id="shell" type="Shell">
    <binding name="stylesheets" value="ognl:styles" />
    ...
</component>

The code above is not working, so I would be glad if someone gave me a solution.

Thanks for suggestions,
Audrius

Re: List of assets using OGNL

Posted by Audrius Peseckis <au...@ivs.lt>.
Thanks, this one works fine.

----- Original Message ----- 
From: "corsair" <pa...@fontel.net.ua>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, November 28, 2005 3:23 PM
Subject: Re: List of assets using OGNL


> Try to use as me
>
> <span jwcid="@Shell" title="My Site" stylesheets='ognl:{getAsset("style"), 
> getAsset("common")}' doctype="">
>
> Audrius Peseckis wrote:
>> Hello,
>>
>> I'm trying to create an arrayList of css files to use it in my Shell 
>> component. Is it possible to create an array of assets, which would be 
>> used in Shell component only using ognl expressions. Something like:
>>
>> <property name="styles" initial-value="ognl:java.util.ArrayList()" />
>> <asset name="style" path="styles/screen.css" 
>> property="ognl:styles.add(asset('style'))" />
>>
>> <component id="shell" type="Shell">
>>     <binding name="stylesheets" value="ognl:styles" />
>>     ...
>> </component>
>>
>> The code above is not working, so I would be glad if someone gave me a 
>> solution.
>>
>> Thanks for suggestions,
>> Audrius
>
>
> ---------------------------------------------------------------------
> 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: List of assets using OGNL

Posted by corsair <pa...@fontel.net.ua>.
Try to use as me

<span jwcid="@Shell" title="My Site" 
stylesheets='ognl:{getAsset("style"), getAsset("common")}' doctype="">

Audrius Peseckis wrote:
> Hello,
> 
> I'm trying to create an arrayList of css files to use it in my Shell component. Is it possible to create an array of assets, which would be used in Shell component only using ognl expressions. Something like:
> 
> <property name="styles" initial-value="ognl:java.util.ArrayList()" />
> <asset name="style" path="styles/screen.css" property="ognl:styles.add(asset('style'))" />
> 
> <component id="shell" type="Shell">
>     <binding name="stylesheets" value="ognl:styles" />
>     ...
> </component>
> 
> The code above is not working, so I would be glad if someone gave me a solution.
> 
> Thanks for suggestions,
> Audrius


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