Em Mon, 27 Oct 2008 09:20:01 -0300, James Sherwood
<[EMAIL PROTECTED]> escreveu:
Thank you, it seems to have created all the classes with annotations
correctly!
You're welcome!
I tried to create a beaneditform off the User class but I get the error:
Exception instantiating instance of com.james.taphib.entities.Users (for
component 'AddUser:user.editor'): Error invoking constructor
com.james.taphib.entities.Users(Occupation, String, String) (at
Users.java:35) (for service 'BeanModelSource'):
When instantiating a class, BeanEditForm uses the same approach as the one
used when you declare some service via ServiceBinder.bind(...). I suggest
you to instantiate you class yourself before the form is rendered:
@OnEvent(component = "yourBeanEditFormIdHere", value=Form.PREPARE)
public void instantiateObject() {
yourField = new Users(......);
}
The prepare event of the Form component is fired before the component is
rendered and before the form values are set in your object(s) fields.
Another suggestions: rename your Users class to User. :)
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]