Re: AjaxButton does not respect return false on client side

2014-04-21 Thread Entropy
So I figured out that what's happening is that evidently wicket 6 doesn't put
the javascript inline, but uses event listener registration or whatever. 
And it seems like this overwrites my inline event in an AjaxButton.  The
solution:

@Override
protected void 
updateAjaxAttributes(AjaxRequestAttributes attributes) {
super.updateAjaxAttributes(attributes);
AjaxCallListener listener = new 
AjaxCallListener();
listener.onPrecondition(return copyClick(););
attributes.getAjaxCallListeners().add(listener);
}

However, no sooner do I solve this, then I find that one of my submit
buttons (which is just a new Button, not AjaxButton) is having a similar
problem.  But the above method does not exist on mere Button.  How can I do
something similar?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-does-not-respect-return-false-on-client-side-tp4665497p4665498.html
Sent from the Users forum 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



Re: AjaxButton does not respect return false on client side

2014-04-21 Thread Entropy
Nevermind.  This secondary issue was caused by one of my many experiments to
solve the original issue.  Further, I also found that if I had needed to do
this, the method to override is getOnClickScript().

I will say, that I am a little uncertain if this new style is a good thing. 
Traditionally, Wicket has seemed to work pretty hard to make HTML things
stay in HTML and Java things stay in Java.  I now seem forced to put
javascript code that controls buttons in Java.  

I've put javascript in my java before of course, but usually only when the
javascript needed dynamic elements from the server.  Now this seemingly
client-side behavior is pulled into the server.

But my problems is resolved.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-does-not-respect-return-false-on-client-side-tp4665497p4665499.html
Sent from the Users forum 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



Re: AjaxButton does not respect return false on client side

2014-04-21 Thread Martin Grigorov
hi,

On Apr 21, 2014 6:30 PM, Entropy blmulholl...@gmail.com wrote:

 Nevermind.  This secondary issue was caused by one of my many experiments
to
 solve the original issue.  Further, I also found that if I had needed to
do
 this, the method to override is getOnClickScript().

 I will say, that I am a little uncertain if this new style is a good
thing.
 Traditionally, Wicket has seemed to work pretty hard to make HTML things
 stay in HTML and Java things stay in Java.  I now seem forced to put
 javascript code that controls buttons in Java.

 I've put javascript in my java before of course, but usually only when the
 javascript needed dynamic elements from the server.  Now this seemingly
 client-side behavior is pulled into the server.

no one stops you to use plain non obtrusive JavaScript for this requirement


 But my problems is resolved.

 --
 View this message in context:
http://apache-wicket.1842946.n4.nabble.com/AjaxButton-does-not-respect-return-false-on-client-side-tp4665497p4665499.html
 Sent from the Users forum 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