Yes and I still get the message user is not an Embedded Component

CarstenM a écrit :
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






--
Michael Courcy
http://courcy.blogspot.com

Reply via email to