Re: [T5.2] Constructor issue

2010-10-06 Thread Michal Gruca
Howard Lewis Ship wrote: > > Remember that you can place @Inject on the constructor that should be > used if there's any ambiguity. > That is what I was looking for. Thanks :) and +1 for adding that to FAQ :) -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-Const

Re: [T5.2] Constructor issue

2010-10-05 Thread Jochen Berger
Hi, Am Dienstag, den 05.10.2010, 09:22 -0700 schrieb Howard Lewis Ship: > Remember that you can place @Inject on the constructor that should be > used if there's any ambiguity. I think, this would make a great FAQ entry. I can only speak for myself, but I wasn't aware that this was already possib

RE: [T5.2] Constructor issue

2010-10-05 Thread Jim O'Callaghan
] Constructor issue Hi all. While preparing small showcase app, odd problem came out. When I created domain object with two constructors (first was default NOOP, second one had two parameters string and enum, it was meant for manual initialization only) and tried to use it with beaneditform I

Re: [T5.2] Constructor issue

2010-10-05 Thread Howard Lewis Ship
Remember that you can place @Inject on the constructor that should be used if there's any ambiguity. On Tue, Oct 5, 2010 at 9:22 AM, Howard Lewis Ship wrote: > Your are correct and this has been the behavior since at least 5.1. > > On Tue, Oct 5, 2010 at 9:21 AM, Josh Canfield wrote: >>> >>> Bea

Re: [T5.2] Constructor issue

2010-10-05 Thread Howard Lewis Ship
Your are correct and this has been the behavior since at least 5.1. On Tue, Oct 5, 2010 at 9:21 AM, Josh Canfield wrote: >> >> BeanEditor (used internally for BeanEditForm) uses the no-args constructor >> if it exists. I apologize for not making this distinction clear. >> > > I'm looking at the 5

Re: [T5.2] Constructor issue

2010-10-05 Thread Josh Canfield
> > BeanEditor (used internally for BeanEditForm) uses the no-args constructor > if it exists. I apologize for not making this distinction clear. > I'm looking at the 5.2 source and BeanEditor uses the BeanModel to get the instance, calls "newInstance()" which also uses the ObjectLocator.autobuild

Re: [T5.2] Constructor issue

2010-10-05 Thread Josh Canfield
> "Often, the BeanEditForm can create the object as needed (assuming a public, > no arguments constructor). " I believe the java docs are out of date. The change happened in a dependent class and the docs don't reflect the change. As Thiago said, the current strategy is to try to make the most comp

Re: [T5.2] Constructor issue

2010-10-05 Thread Thiago H. de Paula Figueiredo
On Tue, 05 Oct 2010 12:17:46 -0300, Michal Gruca wrote: I must disagree. But first to clarify. I described two cases. 1. BeanEditForm that cannot instantiate my object BeanEditor (used internally for BeanEditForm) uses the no-args constructor if it exists. I apologize for not making this

Re: [T5.2] Constructor issue

2010-10-05 Thread Michal Gruca
I must disagree. But first to clarify. I described two cases. 1. BeanEditForm that cannot instantiate my object 2. Same issue for SSO creating java.util.Date AD 1. Quote from BeanEditForm doc: "Often, the BeanEditForm can create the object as needed (assuming a public, no arguments constructor).

Re: [T5.2] Constructor issue

2010-10-05 Thread Thiago H. de Paula Figueiredo
On Tue, 05 Oct 2010 10:09:09 -0300, Michal Gruca wrote: Hi all. Hi! After removing parametrized constructor, error disappeared. It's bit odd IMHO. That's documented behavior: http://tapestry.apache.org/tapestry5.1/guide/appstate.html. This page is for 5.1, but it should be the same

[T5.2] Constructor issue

2010-10-05 Thread Michal Gruca
Hi all. While preparing small showcase app, odd problem came out. When I created domain object with two constructors (first was default NOOP, second one had two parameters string and enum, it was meant for manual initialization only) and tried to use it with beaneditform I received exception that