Re: setDefaultFormProcessing and models
Bernard wrote > Hi, > > Perhaps you can use a combination of what is avaliable in the javadoc > of org.apache.wicket.markup.html.form.Form e.g. > FormComponent#updateModel() That ALMOST works. The javadoc for updateModel says it assumes that convertInput() has been called. But convertInput() is protected, and invoked when you validate(). Now as it turns out, the specific component I am working on doesn't have any component level validation (the validation i was avoiding was form level), so i can call validate() then updateModel() and that works for me in this particular case. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setDefaultFormProcessing-and-models-tp4657804p4657816.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: setDefaultFormProcessing and models
Hi, Perhaps you can use a combination of what is avaliable in the javadoc of org.apache.wicket.markup.html.form.Form e.g. FormComponent#updateModel() Regards, Bernard On Sun, 7 Apr 2013 15:14:19 -0700 (PDT), you wrote: >Maybe I just need this explained to me a little clearer, but I was wondering >about what appears to me to be a contradiction in how validation and >model-setting and the setDefaultFormProcessing(false) works. Maybe >contradiction is the wrong word. Let's say "inconvenience". > >So I get that when I set form processing to false that validators are not >called. I need this on any ajax event I want to perform. However, it is >very rare that my ajax events don't operate on some number of inputs set by >the user. So I want the models to be loaded with the data from the form as >if form processing were happening. > >Instead, I seem to be forced to use this getInput() method which is much >less refined than the model setting mechanisms and forces me to do more >coding. Is there a way I can turn validators off, but still get my models >loaded with data as if form processing were on? Or is getInput() really my >only alternative? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
setDefaultFormProcessing and models
Maybe I just need this explained to me a little clearer, but I was wondering about what appears to me to be a contradiction in how validation and model-setting and the setDefaultFormProcessing(false) works. Maybe contradiction is the wrong word. Let's say "inconvenience". So I get that when I set form processing to false that validators are not called. I need this on any ajax event I want to perform. However, it is very rare that my ajax events don't operate on some number of inputs set by the user. So I want the models to be loaded with the data from the form as if form processing were happening. Instead, I seem to be forced to use this getInput() method which is much less refined than the model setting mechanisms and forces me to do more coding. Is there a way I can turn validators off, but still get my models loaded with data as if form processing were on? Or is getInput() really my only alternative? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setDefaultFormProcessing-and-models-tp4657804.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org