You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Richard Lewis-Shell <rl...@mac.com> on 2003/11/12 06:15:58 UTC

Malformed OGNL expression

I have just updated our Tapestry 2.2 app to OGNL 2.6.3.  In one place we are
getting an OGNL error from a fairly innocent looking expression (that worked
fine with OGNL 2.4.2).  The error is:

Encountered "band" at line 1, column 46. Was expecting one of: "(" ... "{"
... <IDENT> ...

ognl.OgnlParser.generateParseException(OgnlParser.java:3265)

The binding expression is simply:
currentTaskManager.currentOccupationBandLink.band

All the properties involved there have public getter/setters.  If I change
.band to .getBand() it works OK.  Any ideas why this would be necessary?
None of the other similar expressions needed this change...

Richard



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


Re: Malformed OGNL expression

Posted by Richard Lewis-Shell <rl...@mac.com>.
bitwise and - of course!!  cheers Drew - the inconvenience is minor compared
with the rest of the OGNL benefits...

R

----- Original Message ----- 
From: "Drew Davidson" <dr...@ognl.org>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, November 17, 2003 7:41 AM
Subject: Re: Malformed OGNL expression


> Richard Lewis-Shell wrote:
>
> >I have just updated our Tapestry 2.2 app to OGNL 2.6.3.  In one place we
are
> >getting an OGNL error from a fairly innocent looking expression (that
worked
> >fine with OGNL 2.4.2).  The error is:
> >
> >Encountered "band" at line 1, column 46. Was expecting one of: "(" ...
"{"
> >... <IDENT> ...
> >
> >ognl.OgnlParser.generateParseException(OgnlParser.java:3265)
> >
> >The binding expression is simply:
> >currentTaskManager.currentOccupationBandLink.band
> >
> >All the properties involved there have public getter/setters.  If I
change
> >.band to .getBand() it works OK.  Any ideas why this would be necessary?
> >None of the other similar expressions needed this change...
> >
> >
> XML-friendly variants of all operators were added to the 2.6.1 version.
> This allows you to embed expressions in XML without having to escape
> them with entity escapes.  The 'band' operator parallels the '&'
> operator.  For a complete list, consult:
>
>     http://www.ognl.org/2.6.3/Documentation/html/reference.html#operators
>
> In this case it looks like a bug because your usage is unambiguously not
> an operator, but a property.  I'll see what I can do about it.
>
> Sorry for the inconvenience.
>
> - Drew
>
> -- 
> +---------------------------------+
> < Drew Davidson | OGNL Technology >
> <     Professional Open Source    >
> +---------------------------------+
> |  Email: drew@ognl.org          /
> |    Web: http://www.ognl.org   /
> |    Vox: (520) 531-1966       <
> |    Fax: (520) 531-1965        \
> | Mobile: (520) 405-2967         \
> +---------------------------------+
>
>
>
> ---------------------------------------------------------------------
> 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: Malformed OGNL expression

Posted by Drew Davidson <dr...@ognl.org>.
Richard Lewis-Shell wrote:

>I have just updated our Tapestry 2.2 app to OGNL 2.6.3.  In one place we are
>getting an OGNL error from a fairly innocent looking expression (that worked
>fine with OGNL 2.4.2).  The error is:
>
>Encountered "band" at line 1, column 46. Was expecting one of: "(" ... "{"
>... <IDENT> ...
>
>ognl.OgnlParser.generateParseException(OgnlParser.java:3265)
>
>The binding expression is simply:
>currentTaskManager.currentOccupationBandLink.band
>
>All the properties involved there have public getter/setters.  If I change
>.band to .getBand() it works OK.  Any ideas why this would be necessary?
>None of the other similar expressions needed this change...
>  
>
XML-friendly variants of all operators were added to the 2.6.1 version.  
This allows you to embed expressions in XML without having to escape 
them with entity escapes.  The 'band' operator parallels the '&' 
operator.  For a complete list, consult:

    http://www.ognl.org/2.6.3/Documentation/html/reference.html#operators

In this case it looks like a bug because your usage is unambiguously not 
an operator, but a property.  I'll see what I can do about it.

Sorry for the inconvenience.

- Drew

-- 
+---------------------------------+
< Drew Davidson | OGNL Technology >
<     Professional Open Source    >
+---------------------------------+
|  Email: drew@ognl.org          /
|    Web: http://www.ognl.org   /
|    Vox: (520) 531-1966       <
|    Fax: (520) 531-1965        \
| Mobile: (520) 405-2967         \
+---------------------------------+



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