to Eelco
> You used Form#setDefaultButton ?
Yes. I used Form's setDefaultButton method.
// Some source code:
final CourseSelectionRule courseSelectionRuleSearch = new
CourseSelectionRule();
final CommonMaster objSearch = new CommonMaster();
Form form = new Form("frmCourseSelectRuleList", new
CompoundPropertyModel(courseSelectionRuleSearch));
add(form);
... ...
Button searchButton = new Button("searchButton") {
protected void onSubmit() {
setSearchCondition(courseSelectionRuleSearch,
objSearch);
}
};
form.add(searchButton);
form.setDefaultButton(searchButton);
> You can see an example of where that works in the wizard component
> (example abracadabra), where the default button is 'next'.
abracadabra of examples has not a TextField. some pages have two TextFields.
some pages have no TextField.
My question is that the form has only one TextField.
to -igor
> mm yes, when you press enter the button is not invoked, only the form's
> onsubmit handler is invoked -- because you didnt actually press the button
> :)
When a form has two TextFields, and cursor is in a TextField, press enter
key, Default button's onSubmit can be called.
others,
if cursor is in the form, press enter key, Default button's onSubmit can
also be called.
Eelco Hillenius wrote:
>
> On 2/1/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>> You used Form#setDefaultButton ?
>
> You can see an example of where that works in the wizard component
> (example abracadabra), where the default button is 'next'.
>
> Eelco
>
>
--
View this message in context:
http://www.nabble.com/form%27s-DefaultButon%2C-Click%27event-is-invalidation-tf3155687.html#a8765283
Sent from the Wicket - Dev mailing list archive at Nabble.com.