You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2005/08/24 19:24:02 UTC
Re: OgnlUtils? 4.0
Yes, you'll need to inject the tapestry.ognl.ExpressionCache service.
However, given that expression caching is built into the
tapestry.ognl.ExpressionEvaluator, service don't see why you would
need to get parsed expressions.
On 8/24/05, Eric Schneider <er...@centralparksoftware.com> wrote:
> Hi,
>
> In a 3.0 application I made use of some OgnlUtils API. The class
> appears to be gone in 4.0.
>
> Is there a suggested 4.0 replacement for the following:
>
> OgnlUtils.getParsedExpression(property);
>
> Thanks!
> Eric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: OgnlUtils? 4.0
Posted by Howard Lewis Ship <hl...@gmail.com>.
I would suggest looking at the simpler PropertyUtils class in HiveMind
to change this code. OGNL is overkill when the most you will ever do
is read a property.
On 8/24/05, Eric Schneider <er...@centralparksoftware.com> wrote:
> Howard,
>
> Thanks. Actually, the spot that uses this call isn't a component,
> it's a generic implementation of IPropertySelectionModel (which I
> inherited from a previous post on the tapestry list). Honestly, I
> don't really know what getParsedExpression() does, so it is difficult
> for me to tell why I need to get parsed expressions.
>
> This might be a dumb question, but is it possible to inject a service
> into a non-component? I'm not clear on how I would do that.
>
> Thanks,
> Eric
>
> public String getLabel(int index) {
> Object obj = getOption(index);
> if (obj == null) {
> return noSelectionLabel;
> }
> String realValue = null;
> Object parsedExpr = OgnlUtils.getParsedExpression(property);
> if (ExpressionEvaluatorImpl.)
> try {
> realValue = (String)Ognl.getValue(parsedExpr, obj);
> } catch (OgnlException ex) {
> throw new RuntimeException(
> "ListPropertySelectionModel: Couldn't read " +
> property, ex);
> }
> return realValue;
> }
>
>
> On Aug 24, 2005, at 1:24 PM, Howard Lewis Ship wrote:
>
> > Yes, you'll need to inject the tapestry.ognl.ExpressionCache service.
> >
> > However, given that expression caching is built into the
> > tapestry.ognl.ExpressionEvaluator, service don't see why you would
> > need to get parsed expressions.
> >
> > On 8/24/05, Eric Schneider <er...@centralparksoftware.com> wrote:
> >
> >> Hi,
> >>
> >> In a 3.0 application I made use of some OgnlUtils API. The class
> >> appears to be gone in 4.0.
> >>
> >> Is there a suggested 4.0 replacement for the following:
> >>
> >> OgnlUtils.getParsedExpression(property);
> >>
> >> Thanks!
> >> Eric
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-user-
> >> help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work. http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > 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
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: OgnlUtils? 4.0
Posted by Eric Schneider <er...@centralparksoftware.com>.
Howard,
Thanks. Actually, the spot that uses this call isn't a component,
it's a generic implementation of IPropertySelectionModel (which I
inherited from a previous post on the tapestry list). Honestly, I
don't really know what getParsedExpression() does, so it is difficult
for me to tell why I need to get parsed expressions.
This might be a dumb question, but is it possible to inject a service
into a non-component? I'm not clear on how I would do that.
Thanks,
Eric
public String getLabel(int index) {
Object obj = getOption(index);
if (obj == null) {
return noSelectionLabel;
}
String realValue = null;
Object parsedExpr = OgnlUtils.getParsedExpression(property);
if (ExpressionEvaluatorImpl.)
try {
realValue = (String)Ognl.getValue(parsedExpr, obj);
} catch (OgnlException ex) {
throw new RuntimeException(
"ListPropertySelectionModel: Couldn't read " +
property, ex);
}
return realValue;
}
On Aug 24, 2005, at 1:24 PM, Howard Lewis Ship wrote:
> Yes, you'll need to inject the tapestry.ognl.ExpressionCache service.
>
> However, given that expression caching is built into the
> tapestry.ognl.ExpressionEvaluator, service don't see why you would
> need to get parsed expressions.
>
> On 8/24/05, Eric Schneider <er...@centralparksoftware.com> wrote:
>
>> Hi,
>>
>> In a 3.0 application I made use of some OgnlUtils API. The class
>> appears to be gone in 4.0.
>>
>> Is there a suggested 4.0 replacement for the following:
>>
>> OgnlUtils.getParsedExpression(property);
>>
>> Thanks!
>> Eric
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-
>> help@jakarta.apache.org
>>
>>
>>
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work. http://howardlewisship.com
>
> ---------------------------------------------------------------------
> 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: OgnlUtils? 4.0
Posted by Geoff Longman <gl...@gmail.com>.
I have a case that would need OgnlUtils like functionality in Tap 4.0.
We have a non visual component that is embeded into loops . That
component evaluates a user supplied expression on a user supplied root
object when it's called upon to render (but not rewind). It uses
OgnlUtils.
Geoff
On 8/24/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> Yes, you'll need to inject the tapestry.ognl.ExpressionCache service.
>
> However, given that expression caching is built into the
> tapestry.ognl.ExpressionEvaluator, service don't see why you would
> need to get parsed expressions.
>
> On 8/24/05, Eric Schneider <er...@centralparksoftware.com> wrote:
> > Hi,
> >
> > In a 3.0 application I made use of some OgnlUtils API. The class
> > appears to be gone in 4.0.
> >
> > Is there a suggested 4.0 replacement for the following:
> >
> > OgnlUtils.getParsedExpression(property);
> >
> > Thanks!
> > Eric
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work. http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
The Spindle guy. http://spindle.sf.net
Get help with Spindle:
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates: http://spindle.sf.net/updates
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org