Re: Modal failing to modify it's parent in ajax event

2017-05-08 Thread Martin Grigorov
Hi,

Since you use PageCreator then your modal page is loaded inside an iframe
and all your findings are valid!
You need to use JavaScript 'parent' or 'top' window references to
manipulate the DOM of the page in the browser tab.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, May 8, 2017 at 9:18 PM, Entropy  wrote:

> I have a wicket modal.  On clicking a button in it, that is part of the
> form
> in the modal's page, I need to close the modal, put a message in the
> feedback of the parent page, and invoke a javascript method in the parent
> page.  I am using the pagecreator approach to ModalWindow.  This is Wicket
> 6.26.
>
> The problem is that when i go to hit the button, I am getting the following
> javascipt error:
>
> Wicket.Ajax:  TypeError: Unable to get property 'top' of undefined or null
> reference
>
> It then has two cascaded errors that imply that it is trying to work the
> DOM
> inside the iframe instead of the parent window.  Which makes sense, but I
> am
> almost certain that I've done this sort of thing before (but can't find an
> example).  I don't think I'm doing anything especially different.
>
> I am wondering if I need to run the ModalWindow.closeCurrent() first, and
> then after it closes, respond to the event from that to do the feedback and
> javascript call?  That chaining seems awkward, so I figured I'd ask before
> I
> tried it.
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Modal-failing-to-modify-it-s-parent-in-ajax-
> event-tp4677800.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
>
>


Modal failing to modify it's parent in ajax event

2017-05-08 Thread Entropy
I have a wicket modal.  On clicking a button in it, that is part of the form
in the modal's page, I need to close the modal, put a message in the
feedback of the parent page, and invoke a javascript method in the parent
page.  I am using the pagecreator approach to ModalWindow.  This is Wicket
6.26.

The problem is that when i go to hit the button, I am getting the following
javascipt error:

Wicket.Ajax:  TypeError: Unable to get property 'top' of undefined or null
reference

It then has two cascaded errors that imply that it is trying to work the DOM
inside the iframe instead of the parent window.  Which makes sense, but I am
almost certain that I've done this sort of thing before (but can't find an
example).  I don't think I'm doing anything especially different.  

I am wondering if I need to run the ModalWindow.closeCurrent() first, and
then after it closes, respond to the event from that to do the feedback and
javascript call?  That chaining seems awkward, so I figured I'd ask before I
tried it.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-failing-to-modify-it-s-parent-in-ajax-event-tp4677800.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: RequestCycle and Jersey Jax-rs REST application

2017-05-08 Thread jdelaire
Thanks Martin, I successfully injected one handmade!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RequestCycle-and-Jersey-Jax-rs-REST-application-tp4677786p4677797.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: Modal dialog, form validation in AjaxBootstrapTabbedPanel

2017-05-08 Thread Ernesto Reinaldo Barreiro
Me too :-)

On Mon, May 8, 2017 at 12:56 PM, Martin Grigorov 
wrote:

> Hi Ulrich,
>
> I'm glad to hear that it worked so easily!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, May 8, 2017 at 12:05 PM, Knaack, Ulrich <
> ulrich.kna...@lgln.niedersachsen.de> wrote:
>
> > Hi Martin,
> >
> > sorry for late replying. Issues in another project prevented me from
> > testing your hint.
> >
> > Using ClientSideBootstrapTabbedPanel solved my problem completely.
> > I simply replaced "class MyAjaxTabbedPanel extends
> > AjaxBootstrapTabbedPanel"
> > with
> > "class MyAjaxTabbedPanel extends ClientSideBootstrapTabbedPanel "
> > and removed unnecessary methods.
> > Then, wicket gave me useful hints related to a ClassCastException and to
> a
> > missing call to tabbedPanel.setOutputMarkupId(true) .
> >
> > Thank you for quick response.
> >
> > Regards,
> > Ulrich Knaack
> >
> >
> > > -Ursprüngliche Nachricht-
> > > Von: Martin Grigorov [mailto:mgrigo...@apache.org]
> > > Gesendet: Mittwoch, 3. Mai 2017 15:04
> > > An: users@wicket.apache.org
> > > Betreff: Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel
> > >
> > > Hi,
> > >
> > > I think I see the problem.
> > > When using AjaxBootstrapTabbedPanel the tabs' content is loaded one at
> a
> > > time. This makes it hard to validate the complete form because not all
> > > fields are available at any time.
> > > You may need to use
> > > https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-
> > > 7.x/bootstrap-
> > > core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/ta
> > > bs/ClientSideBootstrapTabbedPanel.java
> > > instead. It will switch the tabs
> > > via JavaScript and make the validation once you use the submit button.
> > > If this doesn't help you then I'll try to take a look at your
> application
> > > after work!
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel

2017-05-08 Thread Martin Grigorov
Hi Ulrich,

I'm glad to hear that it worked so easily!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, May 8, 2017 at 12:05 PM, Knaack, Ulrich <
ulrich.kna...@lgln.niedersachsen.de> wrote:

> Hi Martin,
>
> sorry for late replying. Issues in another project prevented me from
> testing your hint.
>
> Using ClientSideBootstrapTabbedPanel solved my problem completely.
> I simply replaced "class MyAjaxTabbedPanel extends
> AjaxBootstrapTabbedPanel"
> with
> "class MyAjaxTabbedPanel extends ClientSideBootstrapTabbedPanel "
> and removed unnecessary methods.
> Then, wicket gave me useful hints related to a ClassCastException and to a
> missing call to tabbedPanel.setOutputMarkupId(true) .
>
> Thank you for quick response.
>
> Regards,
> Ulrich Knaack
>
>
> > -Ursprüngliche Nachricht-
> > Von: Martin Grigorov [mailto:mgrigo...@apache.org]
> > Gesendet: Mittwoch, 3. Mai 2017 15:04
> > An: users@wicket.apache.org
> > Betreff: Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel
> >
> > Hi,
> >
> > I think I see the problem.
> > When using AjaxBootstrapTabbedPanel the tabs' content is loaded one at a
> > time. This makes it hard to validate the complete form because not all
> > fields are available at any time.
> > You may need to use
> > https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-
> > 7.x/bootstrap-
> > core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/ta
> > bs/ClientSideBootstrapTabbedPanel.java
> > instead. It will switch the tabs
> > via JavaScript and make the validation once you use the submit button.
> > If this doesn't help you then I'll try to take a look at your application
> > after work!
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel

2017-05-08 Thread Knaack, Ulrich
Hi Martin,

sorry for late replying. Issues in another project prevented me from testing 
your hint.

Using ClientSideBootstrapTabbedPanel solved my problem completely.
I simply replaced "class MyAjaxTabbedPanel extends 
AjaxBootstrapTabbedPanel"
with 
"class MyAjaxTabbedPanel extends ClientSideBootstrapTabbedPanel "
and removed unnecessary methods.
Then, wicket gave me useful hints related to a ClassCastException and to a 
missing call to tabbedPanel.setOutputMarkupId(true) .

Thank you for quick response.

Regards,
Ulrich Knaack


> -Ursprüngliche Nachricht-
> Von: Martin Grigorov [mailto:mgrigo...@apache.org]
> Gesendet: Mittwoch, 3. Mai 2017 15:04
> An: users@wicket.apache.org
> Betreff: Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel
> 
> Hi,
> 
> I think I see the problem.
> When using AjaxBootstrapTabbedPanel the tabs' content is loaded one at a
> time. This makes it hard to validate the complete form because not all
> fields are available at any time.
> You may need to use
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-
> 7.x/bootstrap-
> core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/ta
> bs/ClientSideBootstrapTabbedPanel.java
> instead. It will switch the tabs
> via JavaScript and make the validation once you use the submit button.
> If this doesn't help you then I'll try to take a look at your application
> after work!
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 


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



Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel - solved

2017-05-08 Thread Knaack, Ulrich
Hi Martin,

sorry for late replying. Issues in another project prevented me from testing 
your hint.

Using ClientSideBootstrapTabbedPanel solved my problem completely.
I simply replaced "class MyAjaxTabbedPanel extends 
AjaxBootstrapTabbedPanel"
with 
"class MyAjaxTabbedPanel extends ClientSideBootstrapTabbedPanel "
and removed unnecessary methods.
Then, wicket gave me useful hints related to a ClassCastException and to a 
missing call to tabbedPanel.setOutputMarkupId(true) .

Thank you for quick response.

Regards,
Ulrich Knaack


> -Ursprüngliche Nachricht-
> Von: Martin Grigorov [mailto:mgrigo...@apache.org]
> Gesendet: Mittwoch, 3. Mai 2017 15:04
> An: users@wicket.apache.org
> Betreff: Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel
> 
> Hi,
> 
> I think I see the problem.
> When using AjaxBootstrapTabbedPanel the tabs' content is loaded one at a
> time. This makes it hard to validate the complete form because not all
> fields are available at any time.
> You may need to use
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-
> 7.x/bootstrap-
> core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/ta
> bs/ClientSideBootstrapTabbedPanel.java
> instead. It will switch the tabs
> via JavaScript and make the validation once you use the submit button.
> If this doesn't help you then I'll try to take a look at your application
> after work!
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 


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