Re: AjaxCheckBox ListView Bug

2016-04-20 Thread alexandre ricciardi
Hi Sven, This solves the problem, thanks a lot for your reply ! Regards, Alexandre Le mer. 20 avr. 2016 à 18:02, Sven Meier a écrit : > Hi, > > check your markup - you should not have an id in there: > > id="all_checkboxes_have_the_same_id"/> > > Have fun > Sven > > On 20.04.2016 17:23, alex

Re: Adding multiple WebSocketBehavior instances to the same page

2016-04-20 Thread Francesco Chicchiriccò
On 20/04/2016 17:58, Martin Grigorov wrote: Hi, There is no point in having more than one WebSocket connections per page. And actually, Wicket Native WebSockets do not support it out of the box. The registry with the websocket connections at the server side uses a key so there could be just one

Re: HTTP ERROR:500

2016-04-20 Thread Martin Grigorov
Hi Lon, Welcome to Wicket! It seems you run your application in Production mode and that's why it shows this almost empty page. In Production it is recommended to not show detailed information about your application problems to your audience. If you change the configuration type to Development th

HTTP ERROR:500

2016-04-20 Thread Lon Varscsak
Hey all, I’m new to wicket and I got this horrendous error earlier today: I had NO idea what it meant. :P I was able to debug it and see what was left in queue, and that reminded me that I hadn’t finished the html for a new component I had added in the constructor. My question is, isn’t there a

Re: AjaxCheckBox ListView Bug

2016-04-20 Thread Sven Meier
Hi, check your markup - you should not have an id in there: id="all_checkboxes_have_the_same_id"/> Have fun Sven On 20.04.2016 17:23, alexandre ricciardi wrote: Hello, I want to update a dropdown list with ajax calls triggered by checkboxes. I have a ListView of AjaxCheckBoxes but only the

Re: Adding multiple WebSocketBehavior instances to the same page

2016-04-20 Thread Martin Grigorov
Hi, There is no point in having more than one WebSocket connections per page. And actually, Wicket Native WebSockets do not support it out of the box. The registry with the websocket connections at the server side uses a key so there could be just one connection per page. Now the next problem is

Re: AjaxCheckBox ListView Bug

2016-04-20 Thread Martin Grigorov
Hi, Please try by calling listModules.setReuseItems(true); Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Apr 20, 2016 at 5:23 PM, alexandre ricciardi < alexandre.ricciardi.reac...@gmail.com> wrote: > Hello, > > > I want to update a dropdown list with ajax

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
In this case yes, I do have to execute some logic server side anyway... Thanks again. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-way-to-show-a-Are-you-sure-you-want-to-navigate-away-page-tp4674323p4674339.html Sent from the Users forum mailing list archiv

AjaxCheckBox ListView Bug

2016-04-20 Thread alexandre ricciardi
Hello, I want to update a dropdown list with ajax calls triggered by checkboxes. I have a ListView of AjaxCheckBoxes but only the first AjaxCheckBox is callbacked. It appears that all ajax calls are triggered by the first check box. Changing the following checkboxes have not effect. DropDownChoi

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Ernesto Reinaldo Barreiro
Ok. But this makes an extra roundtrip to the server.. is that what you want? On Wed, Apr 20, 2016 at 3:16 PM, Lorne Malvo wrote: > Ernesto thanks for the help. > > I made it work by using an AjaxEventBehavior and adding it directly to the > page, like so: > > > AjaxEventBehavior event = new Ajax

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Ernesto Reinaldo Barreiro
No idea... You add this with a panel that is updated via AJAX? I will try it with simple example. On Wed, Apr 20, 2016 at 2:35 PM, Lorne Malvo wrote: > Hi Ernesto, > > thanks - but that didn't quite work. Wicket Ajax Debug tells me "window" is > not in the DOM. > > Any other ideas? > > Thanks! >

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Ernesto thanks for the help. I made it work by using an AjaxEventBehavior and adding it directly to the page, like so: AjaxEventBehavior event = new AjaxEventBehavior("beforeunload") { @Override protected void onEvent(final AjaxRequestTarget target) { // do stuff here tar

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Martin Grigorov
Hi, Please show us your code. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Apr 20, 2016 at 2:35 PM, Lorne Malvo wrote: > Hi Ernesto, > > thanks - but that didn't quite work. Wicket Ajax Debug tells me "window" is > not in the DOM. > > Any other ideas? >

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Hi Ernesto, thanks - but that didn't quite work. Wicket Ajax Debug tells me "window" is not in the DOM. Any other ideas? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-way-to-show-a-Are-you-sure-you-want-to-navigate-away-page-tp4674323p4674331.html

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Ernesto Reinaldo Barreiro
Did it worked? On Wed, Apr 20, 2016 at 2:15 PM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > Just guessing > > OnEventHeaderItem forScript("window", "*beforeunload*", "*function*() { > *return > '**Sure do you want to leave us?'*; }"); > > On Wed, Apr 20, 2016 at 1:31 PM, Lorne Malvo

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Ernesto Reinaldo Barreiro
Just guessing OnEventHeaderItem forScript("window", "*beforeunload*", "*function*() { *return '**Sure do you want to leave us?'*; }"); On Wed, Apr 20, 2016 at 1:31 PM, Lorne Malvo wrote: > Thanks Ernesto. > > I tried using OnEventHeaderItem but can't quite get it to work. > What would I use as

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Thanks Ernesto. I tried using OnEventHeaderItem but can't quite get it to work. What would I use as a target? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-way-to-show-a-Are-you-sure-you-want-to-navigate-away-page-tp4674323p4674326.html Sent from

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Ernesto Reinaldo Barreiro
Modal window does this like *// Wicket.Window.unloadConfirmation is deprecated but we need to check it // for backward compatibility. Remove it after Wicket 7.0 **if *(*this*.settings.unloadConfirmation && Wicket.Window.unloadConfirmation) { Wicket.Event.add(window, *'beforeunload'*,*this*.onbef

Re: Component disabled if it contains data

2016-04-20 Thread Andrew Geery
It sounds like that, in addition to the behavior, you also need a wicket validator. Since the validation condition involves two fields, you'll need to implement an IFormValidator and add it to the containing form [1]. The #getDependentComponents() method should return the two textfields. In the

"Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Does Wicket have any built in support for showing a "Are you sure you want to navigate away from this page" message when the user navigates away from the page? What would be the simplest way to detect when a user is trying to navigate away from a page, execute some Java code, and then show a "Are

Re: Component disabled if it contains data

2016-04-20 Thread Iamuser
Hello, Thank you all for the help. Is there a way to only rerender the two components (inputtext fields) and not all the page? So submit should remain like this: @Override protected void onSubmit() { //other stuff } The logic is that I should be able to commit changes only if

Re: Component disabled if it contains data

2016-04-20 Thread Andrew Geery
Yes, you can do that: simply change the components that you are adding to the AjaxRequestTarget object to be the form components rather than the entire form. You'll need to use something like an AjaxButton so you have access to the AjaxRequestTarget: FormComponent c1 = ... FormComponent c2 = ...

Re: Component disabled if it contains data

2016-04-20 Thread Iamuser
Hello, Thank you all for the help. Is there a way to only rerender the two components (inputtext fields) and not all the page? So submit should remain like this: @Override protected void onSubmit() { //other stuff } -- View this message in context: http://apache-wicket.1842946.n4.nab

Re: Adding multiple WebSocketBehavior instances to the same page

2016-04-20 Thread Francesco Chicchiriccò
Hi Martin, thanks for your prompt reply. Are you suggesting that the best practice is to add WebSocketBehavior at most once per page - and possibly to the page itself? My current situation is that I have defined three different anonymous WebSocketBehavior instances, added to three different p