AjaxFormValidatingBehavior extends AjaxFormSubmitBehavior. I do not
need the feedback update, so I tried AjaxFormSubmitBehavior.
The problem is that AjaxFormSubmitBehavior actually submits the form
(executes my form.onSubmit which actually tries to save the form when
still incomplete!!).
I can work around this by analyzing which button submitted the form
(and if null -> do not save):
myform = new Form(..) {
protected void onSubmit() {
super.onSubmit();
if (findSubmittingButton() != null) {
// do actual save here
}
}
}
It seems like a hack :) Should I just roll with this solution?
**
Martin
2008/6/21 Stefan Lindner <[EMAIL PROTECTED]>:
> Maybe the AjaxFormValidatingBehavior is what you need.
>
> -----Ursprüngliche Nachricht-----
> Von: Martin Makundi [mailto:[EMAIL PROTECTED]
> Gesendet: Samstag, 21. Juni 2008 10:56
> An: [email protected]
> Betreff: DropDownChoice and Raw Input values (of e.g., textfields)
>
> Hi!
>
> Is there a simple way to make DropDownChoice.onChange behave in a manner
> somewhat similar to an
> AjaxFallbackButton.setDefaultFormProcessing(false).onClick?
>
> I have a dropDown and a textField. They are both within a PANEL that gets
> AjaxRefreshed whenever the dropdown choice is changed.
>
> The problem is, that even though I re-use the textField, it does not know its
> convertedInput (probably because the form has not actually been submitted?)
> and it resets itself to its original state. I would like it to keep its state
> as it was when the new dropdown value was selected.
>
> Currently both textField.getConvertedInput and textField.getInput are null...
> "All I need" is to attach some defaultFormProcessing(false) behavoir to the
> dropDown (and the form submit, ofcourse) ;)
>
> **
> Martin
>
> ---------------------------------------------------------------------
> 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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]