Re: DropDownChoice selection won't update form fields

2012-02-25 Thread Andrea Del Bene
Well, if it does its job I think it should be ok :) I got it working, but I'm not sure if the way I did it is correct. Here's the final code: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4417640.html

Re: DropDownChoice selection won't update form fields

2012-02-24 Thread oggie
I got it working, but I'm not sure if the way I did it is correct. Here's the final code: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4417640.html Sent from the Users forum mailing list archive at

Re: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
Also, the drop down is not part of the form. Here's the HTML: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-selection-won-t-update-form-fields-tp4413980p4414035.html Sent from the Users forum mailing list archive at Nabble.com.

Re: DropDownChoice selection won't update form fields

2012-02-23 Thread Andrea Del Bene
Hi, you can clean up your page using a CompundPropertyModel for your form and a Model for dropDownChoice. I would make a chain of models passing Model to CompoundPropertyModel: model = new Model(configType);//for dropDownChoice CompoundPropertyModel cpm = new CompoundPropertyModel(model)

Re: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
That worked. Thanks! The only downside is that the wicket plugin for netbeans is throwing a bunch of errors at me due to the way it's now set up. It's saying that everything I add to the form is a child in Java and not in HTML. -- View this message in context:

Re: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
I jumped the gun on that one. It didn't work. I was still calling the old page from my menu. Once I fixed that and I am now calling a new page with your suggestions, the form objects never get updated. Here's the code: -- View this message in context:

Re: DropDownChoice selection won't update form fields

2012-02-23 Thread Andrea Del Bene
Maybe the problem is with resetButton. The code inside onSubmit breaks the model chain. If you want to reset form's field try just with form.setModelObject(new ConfigTypeDTO()); I jumped the gun on that one. It didn't work. I was still calling the old page from my menu. Once I fixed that and

Re: DropDownChoice selection won't update form fields

2012-02-23 Thread oggie
Once again, you make it simpler than I thought it would be. Thanks again. Finally, how do I reset the form from the onSubmit button of the form? I tried this: But it doesn't work. The form never gets reset. I'm able to get the updated list from the DB and repopulate the list. And the list is

Re: DropDownChoice selection won't update form fields

2012-02-23 Thread Andrea Del Bene
This is strange. Can you post the code of the full page? Once again, you make it simpler than I thought it would be. Thanks again. Finally, how do I reset the form from the onSubmit button of the form? I tried this: But it doesn't work. The form never gets reset. I'm able to get the updated