Eelco Hillenius wrote:
On 9/12/07, Vit Rozkovec <[EMAIL PROTECTED]> wrote:
Eelco Hillenius wrote:
On 9/12/07, Vit Rozkovec <[EMAIL PROTECTED]> wrote:
I checked the code out with svn, and run my project with last revision,
however the behavior is still the same.
In the Wizard.java method onBeforeRender() there is a condition
if (buttonBar instanceof IDefaultButtonProvider){}
which in my case never evaluates to true and so the form never gets set
the default button.
Am I correct that you provide your own button bar then? Please take a
look at how WizardButtonBar is implemented.
In fact no, I use standard WizardButtonBar. I checked the implementation
and I understand what it should do, but it does not. At the moment I
solved the problem a bit dirty way - inerhited WizardButtonBar and in
the template changed Finish button to be the first one, so on the last
step Enter is catched correctly by Finish button.
I'm sorry I didn't mention this, but this
https://issues.apache.org/jira/browse/WICKET-954 was a related bug I
fixed two days ago. So for the update to work you also need the latest
snapshot of wicket, not just wicket-extensions.
If it still doesn't work, that's a bug. Could you try please?
Eelco
Yes, I checked out all trunk and did mvn install in parent directory. To
be sure, I checked content of the Form.class in included jar and there
is the patched code.
The behavior is the same.
But I do not think it is the problem, if I understand it well.
As I said earlier, in Wizard.java's method
protected void onBeforeRender()
{
super.onBeforeRender();
Component buttonBar = get(BUTTONS_ID);
if (buttonBar instanceof IDefaultButtonProvider)
{
IFormSubmittingComponent defaultButton =
((IDefaultButtonProvider)buttonBar)
.getDefaultButton(wizardModel);
form.setDefaultButton(defaultButton);
}
}
in Component buttonBar = get(BUTTONS_ID); the buttonBar variable is
assigned null, so we do not even reach form.setDefaultButton(defaultButton);
Vitek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]