Hi,
have you tried it with
@ApplicationState
private User user;
in your page class ?
Michael Courcy wrote:
>
> Hi
>
> In my Page I have a property User, and I want to directly populate the
> value of the form to the bean User
>
> User.java
> class User{
> private String name;
> private String surName;
> .... getters ans setters .....
> }
>
> Start.java
> class Start{
> private User user;
> .... getters and setters ....
> }
>
>
> Start.html :
> <t:form>
> ||||<||input|| ||t||:||type||=||"||TextField||"||
> ||t||:||id||=||"||user.name||"|| ||t||:||value||=||"||user.name||"/>
> ||||<||input|| ||t||:||type||=||"||TextField||"||
> ||t||:||id||=||"||user.surName||"||
> ||t||:||value||=||"||user.surName||"/>||||
> <||input|| ||t||:||id||=||"||submitform||"||
> ||t||:||type||=||"||Submit||"|| ||t||:||value||=||"||submit||" />
> </t:form>
>
> But It seems that it does not work this way and I get an error message :
> User is not an embedded component...
>
> Do you think I'll have to build my own component :
>
> <t:beanField bean="user" property="name" value="user.name" />
>
> Or is there another way to do this without using the beanEditForm ?
> ||
>
> --
> Michael Courcy
> http://courcy.blogspot.com
>
>
>
--
View this message in context:
http://www.nabble.com/T5-Newbie-%3A-populate-the-value-of-a-form-in-a-bean-tf4805095.html#a13747048
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]