On 6/2/06, Johan Compagner <[EMAIL PROTECTED]> wrote: > First that last one with the button as a link that is logical > Because then you don't submit the form. > > second i have no idea what you are exactly doing. > why are you completely resetting the forms model when the button submits? > What do you do with the data that is currently in the model (the submitted > data)
This code in the prev email was reduced for illustration purposes, in the non-reduced code there are actually 3 buttons on the form [new] [save] [delete]. The enable-cycle of new button is as follow: - when [new] is pressed, create a new object, display the new object and set the new button is disabled. - when [save] is pressed, save the object, display the saved object and set the new button to be enabled. - when [delete] is pressed, delete the object, display the next available object (there's a grid underneath the form} and set the new new button to be enabled. > > also this: setModel( getModel() ); doesn't make any sense to me. > > > if you just want to display a new object in the form. Why aren't you just > doing: > form.setModelObject(configuration) I was thinking if the model is large and complex, how about only copying the one that we know is modified. I supposed, model.setObject( Component, Object ) is the one that should be called. > > johan > > > Thanx for the explaination, Edward _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
