click-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alvin Townsend" <alvin.towns...@gmail.com>
Subject Re: "Wrong Number of Arguments" Error in Form.copyTo()
Date Mon, 20 Oct 2008 01:30:38 GMT
Hi Bob,

That largely is the behavior I observe everywhere else in the
application. For reasons unknown, just in this one place, we get this
error. (Even odder is that I cannot replicate the error in my IDE,
(Ganymede) only when packaged and deployed to Tomcat.)

Thank you much for the help!

Alvin

On Sun, Oct 19, 2008 at 3:42 PM, Bob Schellink <sabob1@gmail.com> wrote:
> Alvin Townsend wrote:
>>
>> Hi Bob,
>>
>> That makes a lot of sense. Many of our objects cannot be instantiated
>> without arguments to the Constructors, so I've made sure that all of
>> them were set up previously and that the Form.copyTo wouldn't come
>> across anything null.
>>
>
> Here is some more info. Click calls the getter method of the path to figure
> out whether to instantiate
> a new instance or not.
>
> field = new TextField("address.street");
> form.copyTo(client);
>
> From the above Click will tokenize the field path into "address" and
> "street". Next it will try and check if
> address is null through reflection by invoking the address getter:
>
> client.getAddress();
>
> If client.getAddress returns null Click tries and instantiates the Address.
>
> If you use a debugger you can place a breakpoint roughly on line 595 of
> class net.sf.click.util.ContainerUtils#ensureObjectPathNotNull.
> If your breakpoint is hit, it means Click tries to instantiate a object...
>
> kind regards
>
> bob
>
>
>
>

Mime
View raw message