Thanks Igor! I was mistankenly replacing the model on component resolver. Now it works fine!
"what you have to do is add a component instead of autoadd" Unfortunately add doesn't work during render phase, where component resolvers are called. I found this mail about the subject: http://osdir.com/ml/java.wicket.devel/2005-03/msg00552.html So the only way to make this work is commenting out the removal? igor.vaynberg wrote: > > autocomponents are components that only exist during the render phase, > thus they are removed after. what you have to do is add a component > instead of autoadd. if your model is not being updated set a > breakpoint in updatemodel() and see what it is doing, also make sure > there are no validation errors. > > -igor > > On Mon, Jan 5, 2009 at 12:43 PM, Ricardo Mayerhofer > <[email protected]> wrote: >> >> Thanks Jan, I will look into it! >> >> Igor, you were right. Auto components are deleted. I commented that part >> of >> the code, so now I can access the component (and its model) on form's >> submit. Therefore, the property is not being setted on the form model >> yet... >> Do you have any idea why? BTW, why auto components are deleted after >> rendering? >> >> >> Jan Kriesten-2 wrote: >>> >>> >>> Hi, >>> >>>> auto components are removed after rendering is complete if i recall >>>> correctly, so there is nothing processing the submitted input. >>> >>> there are a couple of problems with that approach, same for embedding >>> components >>> in markup with the <wicket:component> >>> >>> I approached a similar problem auto-adding components with templates. My >>> solution can be found here: >>> http://www.footprint.de/fcc/2008/11/some-wicket-scala/ >>> >>> Instead of handling wxComponent you might filter for other tags - so >>> that >>> might >>> be the solution for you, too. >>> >>> Hope this helps. >>> >>> Best regards, --- Jan. >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/ComponentResolver-and-CompoundPropertyModels-tp21209434p21298927.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://www.nabble.com/ComponentResolver-and-CompoundPropertyModels-tp21209434p21336666.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
