dev@jsftemplating.java.net

Re: JSFTemplating: Re: In current framework, is there a way to...

From: Anissa Lam <Anissa.Lam_at_Sun.COM>
Date: Fri, 16 Jun 2006 19:34:28 -0700

Ken Paulsen wrote:
>
> I believe the '&' character does what you're asking and would look like:
>
> <!if $attribute(isTargetSupported) & $display(isStandAlone) &
> $attribute(isWebModule)>
> </if>
>
> NOTE: The "if" is also a component which has a "condition" property...
> so it can be this way also:
>
> <if condition="...">
> </if>
>
> However, looking at the code... I see I don't have handler-level
> condition support. I forgot about this. :( I intentionally did not
> implement it the same way as before b/c it was limiting and difficult
> to span multiple handlers. I know how to implement what I planned,
> and it won't take long... but I don't know how to represent it well in
> the template file. Any suggestions?
>
> We're in a situation like this:
>
> <!beforeCreate
> if (condition) {
> handler1(foo="bar", x=>$attribute{y});
> handler2();
> }
> />
>
> Should I do the if like that? Other ideas?
I like this syntax much better than the previous framework. In the
jato framework, if we have to call multiple handler, we have to keep
repeating that "if" for every handler call.
Is it possible to add an 'else' in your above proposal ?

thanks
Anissa

>
> Ken
>
> Jennifer Chou wrote:
>> use && type operator in the if?
>> <call name="getApplicationStatusSummary"
>> if="$attribute(isTargetSupported)&&$display(isStandAlone)&&$attribute(isWebModule)">
>>