have a look at this page http://tapestry.apache.org/forms-and-validation.html
""When rendering, the Form component emits two notifications: first, "prepareForRender", then "prepare". These allow the Form's container to setup any fields or properties that will be referenced in the form. For example, this is a good place to create a temporary entity object to be rendered, or to load an entity from a database to be edited."" with regards Sven Homburg Founder of the Chenille Kit Project http://chenillekit.codehaus.org 2012/1/3 felipexz <felipe....@gmail.com>: > Hi, now its working but I think you should add this "hint" in the > documentantion and at the Tutorial. > I know we need to initialize the class but where was my problem. > > The working code is: > > public class CreateMunicipio > { > > @Property > @Persist > private Municipio municipio; > > @Inject > private Session session; > > void onPrepare() throws Exception { > municipio = new Municipio(); > } > > @CommitAfter > Object onSuccess() > { > session.merge(municipio); > return ""; > } > > } > > Now it works. Could you add this onPrepare() in the Tutorial please ? Maybe > more people can have the same question. > > Best regards > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Beaneditor-sending-null-object-tp5115312p5117493.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org