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



Re: Modal dialog, form validation in AjaxBootstrapTabbedPanel

2017-05-03 Thread Martin Grigorov
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/tabs/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

On Wed, May 3, 2017 at 2:19 PM, Knaack, Ulrich <
ulrich.kna...@lgln.niedersachsen.de> wrote:

> Hi,
>
> I've to create a modal dialog which contains a AjaxBootstrapTabbedPanel
> with two or more tabs.
> All tabs belong to the same form. Each tab contains required input fields,
> select boxes
> or drop down choices. Until now, I don't use own validators, but this is a
> future task.
>
> I was able to trigger the validation when switching between the tabs.
>
> When I use the dialog like variant A and B, I get proper feedback from
> validation.
>
> Variant A
> 1. open the dialog
> 2. closing the dialog via submit button immediately results in
> feedback message "please enter a value in field..."
>
> Variant B
> 1. open the dialog
> 2. switch to another tab without filling required fields on initial
> tab gives also "please enter a value in ..."
>
> Variant C - validation problem
> Using the dialog in this way doesn't result in feedback messages:
> 1. open the dialog
> 2. enter all required values on the initial tab
> 3. don't enter values in required fields on another tab
> 4. use the submit button to close the diaolg: no feedback message!!,
> but there has to be one or more
>
> In Variant C, no logging output from the method
> BootstrapAjaxButton#onError() is printed.
>
> I'm using Wicket 7.6.0 and Wicket-Bootstrap 0.10.11
>
> The attachement contains a MCVE which can be run via test class
> StartTryOut.
>
>
> Regards,
> Ulrich Knaack
>
> Landesamt für Geoinformation und Landesvermessung Niedersachsen (LGLN)
> - Landesvermessung und Geobasisinformation - Landesbetrieb -
> Fachgebiet 224 - Geodateninfrastruktur
> Podbielskistraße 331, 30659 Hannover
> Tel.:+49 511 64609-287
> Fax: +49 511 64609-161
> mailto:ulrich.kna...@lgln.niedersachsen.de
> www.lgln.niedersachsen.de
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>