--- Tommy Becker <[EMAIL PROTECTED]> wrote:
> If there were a better description, I'd be happy to give it.  As far as 
> I can tell, our custom PropertyAccessor is not being used.  What we want 
> is to be able to say "property" in an OGNL expression and have it call 
> getPropertyValue("property"), not getProperty().  It seems it's 
> continuing to try getProperty() despite our attempt at registering a 
> custom PropertyAccessor.

Have you turned up OGNL and XWork logging?

Dave

> Laurie Harper wrote:
> > Tommy Becker wrote:
> >> I have a question about using OGNL PropertyAccessors.  We have an 
> >> object on the value stack that we expose to JSP pages that does not 
> >> have standard JavaBeans getter/setter methods.  From what I can tell, 
> >> this leaves us 2 options.  We can either call the getter methods 
> >> explicitly via OGNL method calls in the pages, or we can wrap the 
> >> object in a JavaBean-like object.  The second option is unworkable in 
> >> all but the simplest of cases when you realize that the method calls 
> >> can themselves return another object that needs to be wrapped, or 
> >> even a collection of them.  So we've been using method calls in the 
> >> pages (yeah I know).
> >>
> >> Reading through the OGNL docs, it seems that what we need is a 
> >> PropertyAccessor that knows how to operate on our object.  So we 
> >> implemented one, and attempted to register it by placing this in our 
> >> struts.xml:
> >>
> >> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to" 
> >> class="our.property.accessor.PropertyAccessor"/>
> >>
> >> Unfortunately it doesn't work.  Can someone tell me what we're doing 
> >> wrong, or even if what we're trying to do is possible?  Thanks!
> >
> > I don't know anything about OGNL's PropertyAccessor, but I doubt 
> > anyone can offer much help without seeing the code and a better 
> > description of the failure than "it doesn't work."
> >
> > L.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> NOTICE: This e-mail message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information of
> Motricity.  Any unauthorized review, use, disclosure or distribution is
> prohibited.  If you are not the intended recipient, please contact the
> sender by reply e-mail and destroy all copies of the original message.
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to