Proper XML entities end with a semicolon, so

   <binding name="condition"
            expression="components.foreach.index &gt;= itemIndex &amp;&amp;
            components.foreach.index &lt;= itemIndex" />

This is ugly, but it works. BTW, this is just an equality check (or is it a
made up example?)

Drew (and OGNL):

I wouldn't mide seeing some "aliases" for the relational operators that are
XML friendly, i.e., something like:

    components.foreach.index .GTEQ. itemindex .AND.
        components.foreach.index .LTEQ. itemindex




----- Original Message -----
From: "Patrick Saunders" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 11, 2002 3:36 AM
Subject: [Tapestry-developer] Parser spits it on complex ognl expressions


> Hi Guys,
> If anyone has experimented with OGNL, can they tell me if this statement
is legal.
> In the .jwc for my component I had this expression:
>
> <jwc name="ifToDisplay" type="Conditional" />
>     <binding name="condition"
>             expression="components.foreach.index >= itemIndex &&
>             components.foreach.index <= itemIndex />
> </jwc>
>
> I'm going from memory here, so there may be syntax error, so for
argument's sake, assume all my bindings are OK - they are.
>
> The Tapestry parser complained about the ">=" bit. It suggested "&lt" but
when I did this it complained wanting a ";" after the lt.
> I gave up and coded the conditional the usual way.
>
> After this little exercise, I came to the conclusion like some other guys
here, that business logic should stay hidden awawy, and not be expressed
using OGNL.
>
> IMO making much use of OGNL I think will dilute the structure of what are
inherently well-structed Tapestry Pages/components and make difficult to
maintain, not to mention it just looks crap.
>
> Am I right off track here? If others have used OGNL in Tapestry, in neat,
clean manner I am interested to see how.
>
> Regards,
>
> Pat.
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to