Adding dynamically an informal parameter

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

Adding dynamically an informal parameter

Oscar Picasso
Hi,

Inside an HTML template, I have a @Foreach loop that generates a list of
ILinkComponents. Depending on some condition inside the loop i want to add an
informal parameter. I don't merely want to dynamically set the value of the
parameter but I really want the related html attribute to be generated only if
the condition is true.


Is there a simple way to do that?

Thanks.


Oscar


               
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Adding dynamically an informal parameter

richard.hensley
attribute="ognl:condition?value:null"

If the result of an ognl is null for an informal parameter, the parameter is
removed. I use this all the time for CSS classes and what have you.

Richard

-----Original Message-----
From: Oscar Picasso [mailto:[hidden email]]
Sent: Thursday, May 12, 2005 12:44 PM
To: Tapestry users
Subject: Adding dynamically an informal parameter

Hi,

Inside an HTML template, I have a @Foreach loop that generates a list of
ILinkComponents. Depending on some condition inside the loop i want to add
an
informal parameter. I don't merely want to dynamically set the value of the
parameter but I really want the related html attribute to be generated only
if
the condition is true.


Is there a simple way to do that?

Thanks.


Oscar


               
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Adding dynamically an informal parameter

Oscar Picasso
In reply to this post by Oscar Picasso
It works fine.

Thanks.


--- "Hensley, Richard" <[hidden email]> wrote:

> attribute="ognl:condition?value:null"
>
> If the result of an ognl is null for an informal parameter, the parameter is
> removed. I use this all the time for CSS classes and what have you.
>
> Richard
>
> -----Original Message-----
> From: Oscar Picasso [mailto:[hidden email]]
> Sent: Thursday, May 12, 2005 12:44 PM
> To: Tapestry users
> Subject: Adding dynamically an informal parameter
>
> Hi,
>
> Inside an HTML template, I have a @Foreach loop that generates a list of
> ILinkComponents. Depending on some condition inside the loop i want to add
> an
> informal parameter. I don't merely want to dynamically set the value of the
> parameter but I really want the related html attribute to be generated only
> if
> the condition is true.
>
>
> Is there a simple way to do that?
>
> Thanks.
>
>
> Oscar
>
>
>
> __________________________________
> Yahoo! Mail Mobile
> Take Yahoo! Mail with you! Check email on your mobile phone.
> http://mobile.yahoo.com/learn/mail 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


               
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]