Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Martin Grigorov
Hi, On Tue, Jun 17, 2014 at 4:55 PM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, I have a link (or ajax link) which executes some system command. This system gives me an information if this command is enabled or not, so I can mark my link as enabled or disabled (by calling

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Sven Meier
Hi, when you alter the enabled state in #onConfigure() - this is recommended instead of overriding #isEnabled() - the link will still be enabled when the next click comes in. You can handle the changed system state in your application logic. Best regards Sven On 06/17/2014 03:55 PM, Daniel

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Daniel Stoch
On Tue, Jun 17, 2014 at 4:14 PM, Sven Meier s...@meiers.net wrote: Hi, when you alter the enabled state in #onConfigure() - this is recommended instead of overriding #isEnabled() - the link will still be enabled when the next click comes in. Hmmm, I think I don't understand :). The next

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Daniel Stoch
On Tue, Jun 17, 2014 at 4:00 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Tue, Jun 17, 2014 at 4:55 PM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, I have a link (or ajax link) which executes some system command. This system gives me an information if this command is enabled

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Sven Meier
Hi, The next click does not come because exception is raised. if the link is still enabled, which exception should be thrown then? Sven On 06/17/2014 04:24 PM, Daniel Stoch wrote: On Tue, Jun 17, 2014 at 4:14 PM, Sven Meier s...@meiers.net wrote: Hi, when you alter the enabled state in

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Daniel Stoch
On Tue, Jun 17, 2014 at 4:27 PM, Sven Meier s...@meiers.net wrote: Hi, The next click does not come because exception is raised. if the link is still enabled, which exception should be thrown then? Sven Please read again steps 1,2,3 ;). Link is rendered as enabled in the browser (1),

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Martin Grigorov
On Tue, Jun 17, 2014 at 5:26 PM, Daniel Stoch daniel.st...@gmail.com wrote: On Tue, Jun 17, 2014 at 4:00 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, On Tue, Jun 17, 2014 at 4:55 PM, Daniel Stoch daniel.st...@gmail.com wrote: Hi, I have a link (or ajax link) which

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Sven Meier
If you alter the enabled state of your links in #onConfigure(), they will still be enabled - even if the server state already changed. Sven On 06/17/2014 04:32 PM, Daniel Stoch wrote: On Tue, Jun 17, 2014 at 4:27 PM, Sven Meier s...@meiers.net wrote: Hi, The next click does not come

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Sven Meier
Background information: http://apache-wicket.1842946.n4.nabble.com/vote-release-Wicket-1-4-14-tp3056628p3063795.html http://wicketinaction.com/2011/11/implement-wicket-component-visibility-changes-properly/ Sven On 06/17/2014 05:15 PM, Daniel Stoch wrote: On Tue, Jun 17, 2014 at 5:08 PM,

Re: How to handle click on disabled links - ListenerInvocationNotAllowedException?

2014-06-17 Thread Daniel Stoch
On Tue, Jun 17, 2014 at 5:08 PM, Sven Meier s...@meiers.net wrote: If you alter the enabled state of your links in #onConfigure(), they will still be enabled - even if the server state already changed. Sven Yes, you're right! I have investigated two scenarios just before your last answer :).