I'm sorry, that was not accurate.

The BeanEditForm component fires a prepare event.  You can supply an
onPrepare() event handler method that can instantiate the bean as you
see fit.  This bypasses the logic inside BeanEditForm to instantiate
the bean for you.

On Sun, Aug 17, 2008 at 6:12 AM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> There's another option; you can contribute to the
> ApplicationStateManager service, providing an ApplicationStateCreator
> for your bean.
>
> On Sun, Aug 17, 2008 at 2:04 AM, Andy Pahne <[EMAIL PROTECTED]> wrote:
>>
>> I have the same problem. Unfortunately I cannot add the @Inject annotation
>>  to the class in question, because it is a company wide library and their
>> maintainers rejected to add web related annotations to the companies core
>> business objects.
>>
>> The only solution that came to my mind was using a DTO. Or just building a
>> regular form and not using BeanEditForm at all.
>>
>> Andy
>>
>>
>> Howard Lewis Ship wrote:
>>>
>>> This is some behavior that changes since the writing of the book.
>>>
>>> When the BeanEditForm instantiates a new Celeberty instance, it now
>>> uses the same code that instantiates service implementations (and
>>> injects dependencies).  By default, Tapestry will find the constructor
>>> with the most parameters for this purpose, and will attempt to match
>>> each parameter to a service.
>>>
>>> In this case, we don't want that behavior; we want BeanEditForm to
>>> instantiate via the public no-arguments constructor.
>>>
>>> By placing an @Inject annotation on the public no-arguments
>>> constructor, we can direct BeanEditForm to use that constructor
>>> instead.
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to