Re: override isEnabed of FinishButton

2009-04-08 Thread Matthias Keller

Hi Martin

I had a similiar problem a while ago - I solved it by copying that class 
- it was the fastest thing to do. However, feel free to post a bug 
report about removal of these final modifiers for the next version. They 
already removed some final's in the CLASS definition of these buttons 
for 1.3.5 on my request - I also think they just don't make any sense.


Matt

Martin Tilma wrote:

Hi,

Thnx for the reply, but your solutions won't fix my problem because 
the isEnabled in FinishButton is implemented like this:


/**
 * @see org.apache.wicket.Component#isEnabled()
 */
public final boolean isEnabled()
{
IWizardStep activeStep = getWizardModel().getActiveStep();
return (activeStep != null  
getWizardModel().isLastStep(activeStep));

}

Regards,


Martin

jcgarciam wrote:
I guess, you can try to override protected void onBeforeRender() and 
make

something like:

protected void onBeforeRender(){
  this.setEnabled(true);
  super.onBeforeRender();
}



Martin Tilma wrote:

Hello,

I have a Wizard with a FinishButton. I want the button always be 
enabled. Because the method isEnabled is final I cant override it.


I think coping the button and change the isEnabled method to always 
return true is a bit ugly. What is de best way to do it?


Regards,

Martin




smime.p7s
Description: S/MIME Cryptographic Signature


Re: override isEnabed of FinishButton

2009-04-08 Thread Martin Tilma

Hi,

Thnx for the reply, but your solutions won't fix my problem because the 
isEnabled in FinishButton is implemented like this:


/**
 * @see org.apache.wicket.Component#isEnabled()
 */
public final boolean isEnabled()
{
IWizardStep activeStep = getWizardModel().getActiveStep();
return (activeStep != null  
getWizardModel().isLastStep(activeStep));
}

Regards,


Martin

jcgarciam wrote:

I guess, you can try to override protected void onBeforeRender() and make
something like:

protected void onBeforeRender(){
  this.setEnabled(true);
  super.onBeforeRender();
}



Martin Tilma wrote:

Hello,

I have a Wizard with a FinishButton. I want the button always be 
enabled. Because the method isEnabled is final I cant override it.


I think coping the button and change the isEnabled method to always 
return true is a bit ugly. What is de best way to do it?


Regards,

Martin


--
Martin Tilma
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org








--
Martin Tilma
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



override isEnabed of FinishButton

2009-04-07 Thread Martin Tilma

Hello,

I have a Wizard with a FinishButton. I want the button always be 
enabled. Because the method isEnabled is final I cant override it.


I think coping the button and change the isEnabled method to always 
return true is a bit ugly. What is de best way to do it?


Regards,

Martin


--
Martin Tilma
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: override isEnabed of FinishButton

2009-04-07 Thread jcgarciam

I guess, you can try to override protected void onBeforeRender() and make
something like:

protected void onBeforeRender(){
  this.setEnabled(true);
  super.onBeforeRender();
}



Martin Tilma wrote:
 
 Hello,
 
 I have a Wizard with a FinishButton. I want the button always be 
 enabled. Because the method isEnabled is final I cant override it.
 
 I think coping the button and change the isEnabled method to always 
 return true is a bit ugly. What is de best way to do it?
 
 Regards,
 
 Martin
 
 
 -- 
 Martin Tilma
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/override-isEnabed-of-FinishButton-tp22927709p22930094.html
Sent from the Wicket - User 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