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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> >> For additional commands, e-mail: tapestry-user-
> >> [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> > --
> > 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to