Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 8007 invoked from network); 5 Feb 2008 19:49:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Feb 2008 19:49:33 -0000 Received: (qmail 93689 invoked by uid 500); 5 Feb 2008 19:49:16 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 93660 invoked by uid 500); 5 Feb 2008 19:49:16 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 93649 invoked by uid 99); 5 Feb 2008 19:49:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2008 11:49:16 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.196.97.74] (HELO web56715.mail.re3.yahoo.com) (66.196.97.74) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 05 Feb 2008 19:48:59 +0000 Received: (qmail 49313 invoked by uid 60001); 5 Feb 2008 19:48:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=SRUBZgbuS2tlJwVnus1/O2Ej+u/hOdVMDPmOkrwOapTssaO2KGONYbx55cTlw9K9qzW81Xhg/oUThz59EyVK3ShZ5qi+2Iy/SDOCO5z7RR137UCWiBCrcLFM2elxX81HCrfl++KODuo97Vm9TAN3Hpn9CDK/usnCZ00Ns1KI15s=; Received: from [68.39.7.164] by web56715.mail.re3.yahoo.com via HTTP; Tue, 05 Feb 2008 11:48:51 PST Date: Tue, 5 Feb 2008 11:48:51 -0800 (PST) From: Dave Newton Subject: Re: Custom OGNL PropertyAccessor To: Struts Users Mailing List In-Reply-To: <47A8BB07.8060608@motricity.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <374580.49307.qm@web56715.mail.re3.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --- Tommy Becker 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: > >> > >> >> 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: user-unsubscribe@struts.apache.org > > For additional commands, e-mail: user-help@struts.apache.org > > > > 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: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org