Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 56189 invoked from network); 2 Apr 2007 18:57:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2007 18:57:02 -0000 Received: (qmail 1243 invoked by uid 500); 2 Apr 2007 18:57:03 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 1180 invoked by uid 500); 2 Apr 2007 18:57:03 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 1169 invoked by uid 99); 2 Apr 2007 18:57:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2007 11:57:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [66.180.96.58] (HELO mx.cbeyond.com) (66.180.96.58) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2007 11:56:54 -0700 Received: from [69.15.181.37] (port=46815 helo=[10.10.30.199]) by mx.cbeyond.com with esmtpa (Exim 4.62) (envelope-from ) id 1HYSgC-0008T9-Ex for dev@struts.apache.org; Mon, 02 Apr 2007 15:59:04 -0400 Message-ID: <461151AF.40609@pontarelli.com> Date: Mon, 02 Apr 2007 12:55:43 -0600 From: Brian Pontarelli User-Agent: Thunderbird 1.5.0.10 (X11/20070307) MIME-Version: 1.0 To: Struts Developers List Subject: Re: XWork and OGNL question References: <461138C3.7000305@pontarelli.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Yeah, it looks like it goes all the way through the Ognl stack and out to the ObjectFactory. Not sure why this is happening since supposedly it should handle arrays, collections, Maps, etc. I'm gonna grab the Ognl code and see if I can track this puppy down. If anyone has info, please send it my way. thanks, -bp Bob Lee wrote: > Are you using the Guice Struts 2 plugin? I didn't realize Struts 2 would > delegate to the ObjectFactory to create an int[]. > > Bob > > On 4/2/07, Brian Pontarelli wrote: >> >> >> I'm playing around with Guice as an ObjectFactory and I've run into an >> issue. I've got an action that I want to handle an array of values from >> a form using the [] notation. My form looks something like: >> >> >> >> ... >> >> My action is roughly: >> >> public class Update extends ActionSupport { >> private int[] numbers; >> // getter and setter >> } >> >> What I've found is that when the ParametersInterceptor is called it >> delegates to Ognl and rather than Ognl creating the array and doing all >> the type conversions it is passing control over to Guice and asking >> Guice to instantiate an instance of int[], which of course fails. Is >> this correct or am I missing something between Ognl, XWork and Guice? Or >> is Guice not playing nice and handing back control to Ognl or XWork like >> it is supposed to? >> >> Thanks, >> -bp >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >> For additional commands, e-mail: dev-help@struts.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org