Re: ModalWindow positioning

2014-06-25 Thread Martin Grigorov
Hi, What exactly you tried and it didn't work ? Martin Grigorov Wicket Training and Consulting On Tue, Jun 24, 2014 at 10:32 PM, Lucio Crusca lu...@sulweb.org wrote: Hi *, In a long page I need a ModalWindow to position itself at the center of the browser window even when the page is

Re: ModalWindow positioning

2014-06-25 Thread Lucio Crusca
In data mercoledì 25 giugno 2014 09:49:51, Martin Grigorov ha scritto: Hi, What exactly you tried and it didn't work ? I added the code below, but please note that I'm no JS wizard, so it's likely my code wouldn't work anyway, but the point is I don't even get JS errors and the ModalWindow

Re: ModalWindow positioning

2014-06-25 Thread Martin Grigorov
Make sure that your code appears *after* the script src=.../modal.js. With the browser Dev Tools you can put a breakpoint inside your function and see whether it is called/used. Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 10:53 AM, Lucio Crusca lu...@sulweb.org wrote:

Re: ModalWindow positioning

2014-06-25 Thread Lucio Crusca
In data mercoledì 25 giugno 2014 11:09:42, Martin Grigorov ha scritto: Make sure that your code appears *after* the script src=.../modal.js. With the browser Dev Tools you can put a breakpoint inside your function and see whether it is called/used. I couldn't manage to set a breakpoint with

Re: ModalWindow positioning

2014-06-25 Thread Martin Grigorov
try with Wicket.Window.current Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 2:51 PM, Lucio Crusca lu...@sulweb.org wrote: In data mercoledì 25 giugno 2014 11:09:42, Martin Grigorov ha scritto: Make sure that your code appears *after* the script src=.../modal.js.

Re: ModalWindow positioning

2014-06-25 Thread Martin Grigorov
also try: this.window Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 2:53 PM, Martin Grigorov mgrigo...@apache.org wrote: try with Wicket.Window.current Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 2:51 PM, Lucio Crusca lu...@sulweb.org

WicketTester.executeAjaxEvent causes problems with FormTester.setValue()

2014-06-25 Thread lucast
Dear Forum, I have come across a strange behaviour when running wicketTester.executeAjaxEvent and FormTester on form fields with setRequired( true ); If I call formTester.setValue(), followed by wicketTester.executeAjaxEvent(), followed by formTester.submit(), the values on the form fields are

Re: WicketTester.executeAjaxEvent causes problems with FormTester.setValue()

2014-06-25 Thread Sven Meier
Hi, everytime WicketTester processes a request, all previously set values are consumed, i.e. no longer present for the next request. formTester.setValue() // value is set wicketTester.executeAjaxEvent() // values are consumed formTester.submit() // no values wicketTester.executeAjaxEvent()

Re: WicketTester.executeAjaxEvent causes problems with FormTester.setValue()

2014-06-25 Thread Martin Grigorov
I thought that someone moderates my responses but No, they are published: http://markmail.org/message/e5qhl5nlo2nlwmeh Since 6.16.0 you can do: formTester.setValue() // value is set formTester.setValue() // value is set formTester.submit(pathToAjaxSubmitter) // values are submitted and consumed

Re: WicketTester.executeAjaxEvent causes problems with FormTester.setValue()

2014-06-25 Thread lucast
Thanks for the reply. I wasn't aware that values are consumed after an ajax request. My bad. Thanks for taking the time to reply. It really does make a difference. Regards, Lucas -- View this message in context:

Re: ModalWindow positioning [SOLVED]

2014-06-25 Thread Lucio Crusca
In data mercoledì 25 giugno 2014 14:54:23, Martin Grigorov ha scritto: also try: this.window Ok thanks, this.window seems to be the correct one in my case, but I suspect other variants are needed to be as much cross browser as possible. Just in case others need it, my current working code is:

Re: ModalWindow positioning

2014-06-25 Thread Lucio Crusca
I always forget I should not change the subject, sorry... I send the message again with the unchanged subject so that it remains attached to the rest of this thread. In data mercoledì 25 giugno 2014 14:54:23, Martin Grigorov ha scritto: also try: this.window Ok thanks, this.window seems to be

Model data lost when calling target.add before onSubmit

2014-06-25 Thread Vishal Popat
Hi, I have two panels added to a form. The idea is to create a step 1, step 2 type functionality where after clicking next on panel 1, it hides and shows Panel 2. I have a checkbox on Panel 1 add(new CheckBox(single, new PropertyModel(SelectionPanel.this, single))); and I have

Re: ModalWindow positioning

2014-06-25 Thread Lucio Crusca
In data mercoledì 25 giugno 2014 18:05:54, Lucio Crusca ha scritto: Just in case others need it, my current working code is: Wicket.Window.prototype.center = function() { var myWindow = this.window; if (!myWindow) myWindow = Wicket.Window.current; if (!myWindow) myWindow =