void onPrepare() { user = new UserImpl(); }

On Fri, Jun 27, 2008 at 8:02 AM, Kheldar666 <[EMAIL PROTECTED]> wrote:
>
> Yes, I know how to instantiate an Object in a onSetupRender phase for
> instance.
>
> But in the case of the BeanEditForm, the problem occurs when submitting.
> Maybe the BeanEditForm, on Submit, tries to create a new User before copying
> all datas from the Form to the user's properties ?
>
> So I think I don't really have a place to instantiate anything on my own (or
> I humbly recognized that I really don't know how to do that... ). I tried to
> use the @Persist on the property but it doesn't help :(.
>
> The thing is that the exact same code with a @ApplicationState instead of
> the @Persist works perfectly (if User is declared in the
> ApplicationStateManager), but this is not clean in terms of memory usage...
>
> Not sure to be clear, but I hope to find a solution
>
>
>
> Howard Lewis Ship wrote:
>>
>> There currently isn't a *global* mechanism to map an interface to a
>> class so that BeanEditForm can instantiate it for you.
>>
>> Instead, you can add an event handler to your page for the prepare
>> event.  This method is responsible for preparing the page for either
>> rendering a form, or submitting a form.  You can add code to
>> instantiate the UserImpl object there.
>>
>> Sven's option looks wrong; that's how you define a service, which is
>> orthogonal to your problem.
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/-T5--Instantiate-%22Interfaces%22-tp18153603p18157112.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
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