HI Deepak, please have a look at the below documentation :- http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/BeanEditForm.html
2. You do not need the constructor explicitly defined I believe. And this is with java, you do not need super in the parameterized constructor, that just calls object's constructor...which is implicit. 3.you can initialize the celebrity class in setup or begin render method of your addcelebrity.java, and everything should be fine. Best regards Akshay -----Original Message----- From: "Deepak" <[email protected]> Sent: 16-12-2014 18:37 To: "Tapestry users" <[email protected]> Subject: Re: Correct usage of BeanEditForm to auto generate form, how to ? > > I've started learning Tapestry with ver 5.3.7 from the book by Alexander > Koleshnikov. I'm having problems using BeanEditForm to create a form: > > Render queue error in SetupRender[AddCelebrity:celebrityform.editor]: > Exception instantiating instance of tapestry5.inaction.model.Celebrity > (for > component 'AddCelebrity:celebrityform.editor'): > org.apache.tapestry5.ioc.internal.OperationException: No service > implements > the interface java.lang.String. > > Celebrity.java > ----------------------- > public class Celebrity { > private long id; > private String firstName; > private String lastName; > private Date dateOfBirth; > private Occupation occupation; > private String biography; > private boolean birthDateVerified; > public Celebrity() { > } > public Celebrity(String firstName, String lastName, Date dateOfBirth, > Occupation occupation) { > super(); > this.firstName = firstName; > this.lastName = lastName; > this.dateOfBirth = dateOfBirth; > this.occupation = occupation; > } > > // getter and setter methods > } > > > AddCelebrity.tml > ----------------------- > <t:beaneditform object="celebrity"/> > > AddCelebrity.java > ------------------------- > public class AddCelebrity { > @Persist > @Property > private Celebrity celebrity; > > } > > What am I doing wrong ? > > Thanks, > Deepak >
