Re: WicketTester#testComponentInPage and executeBehavior
Hi Sven, Thanks for replying, The difference is this, in the example you send the component is referenced by its path: tester.executeAjaxEvent("form:select", "inputchange change"); While I reference it by the component: tester.executeAjaxEvent( on, "click" ); I'll try digging in the source to see what happens. On Mon, Nov 20, 2017 at 10:05 PM, Sven Meier wrote: > Hi, > > here's an example usage: > > https://github.com/apache/wicket/blob/master/wicket-core/ > src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavi > orTest.java#L47 > > Please check what's different in your case. > > Have fun > Sven > > > > Am 20.11.2017 um 13:33 schrieb Rob Audenaerde: > >> Hi all, >> >> I try to test a AjaxLink-based component using: >> >> MyComponent myComponent = new MyComponent("id"); >> wicketTester.startComponentInPage( myComponent); >> >> MyComponent contains some AjaxLinks, I want to click on them by: >> >> (uses a visitor to find the first child) >> AjaxLink on = getFirstChild(myComponent, AjaxLink.class) >> executeAjaxEvent( on, "click" ); >> >> However, this gives me: >> >> org.apache.wicket.WicketRuntimeException: No Page found for component >> [VcAjaxLink [Component id = sortza]] >> >> What is the correct wat to execute ajax behaviors in this approach? >> >> Thanks in advance, >> -Rob >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: WicketTester#testComponentInPage and executeBehavior
Hi Sven, Thanks for replying, The difference is this, in the example you send the component is referenced by its path: On Mon, Nov 20, 2017 at 10:05 PM, Sven Meier wrote: > Hi, > > here's an example usage: > > https://github.com/apache/wicket/blob/master/wicket-core/ > src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavi > orTest.java#L47 > > Please check what's different in your case. > > Have fun > Sven > > > > Am 20.11.2017 um 13:33 schrieb Rob Audenaerde: > >> Hi all, >> >> I try to test a AjaxLink-based component using: >> >> MyComponent myComponent = new MyComponent("id"); >> wicketTester.startComponentInPage( myComponent); >> >> MyComponent contains some AjaxLinks, I want to click on them by: >> >> (uses a visitor to find the first child) >> AjaxLink on = getFirstChild(myComponent, AjaxLink.class) >> executeAjaxEvent( on, "click" ); >> >> However, this gives me: >> >> org.apache.wicket.WicketRuntimeException: No Page found for component >> [VcAjaxLink [Component id = sortza]] >> >> What is the correct wat to execute ajax behaviors in this approach? >> >> Thanks in advance, >> -Rob >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: AW: Nested forms in WizardStep
Thank you for your hints. I think I go for the last solution but I will have a glance at the IFormVisitorParticipant though. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketTester#testComponentInPage and executeBehavior
Hi, here's an example usage: https://github.com/apache/wicket/blob/master/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTest.java#L47 Please check what's different in your case. Have fun Sven Am 20.11.2017 um 13:33 schrieb Rob Audenaerde: Hi all, I try to test a AjaxLink-based component using: MyComponent myComponent = new MyComponent("id"); wicketTester.startComponentInPage( myComponent); MyComponent contains some AjaxLinks, I want to click on them by: (uses a visitor to find the first child) AjaxLink on = getFirstChild(myComponent, AjaxLink.class) executeAjaxEvent( on, "click" ); However, this gives me: org.apache.wicket.WicketRuntimeException: No Page found for component [VcAjaxLink [Component id = sortza]] What is the correct wat to execute ajax behaviors in this approach? Thanks in advance, -Rob - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketTester#testComponentInPage and executeBehavior
Hi all, I try to test a AjaxLink-based component using: MyComponent myComponent = new MyComponent("id"); wicketTester.startComponentInPage( myComponent); MyComponent contains some AjaxLinks, I want to click on them by: (uses a visitor to find the first child) AjaxLink on = getFirstChild(myComponent, AjaxLink.class) executeAjaxEvent( on, "click" ); However, this gives me: org.apache.wicket.WicketRuntimeException: No Page found for component [VcAjaxLink [Component id = sortza]] What is the correct wat to execute ajax behaviors in this approach? Thanks in advance, -Rob
AW: Nested forms in WizardStep
Hi Dirk, on selecting your radio choice, do an ajax request and disable your inner Login Form depending on the chosen value. In this case, it won't be part of the form submit, which is executed by the wizard next click. This also should happen after your login is done by your ajax button. After login succeeded, just disable the inner login form, and the user should be able to proceed. Patrick Health AG| Patrick Davids | Softwareentwickler Tel. +49 40 524 709-258 | p.dav...@healthag.de Fax +49 40 524 709-258 | www.healthag.de EOS Health IT-Concept GmbH | Lübeckertordamm 1–3 | 20099 Hamburg | GmbH mit Sitz in Hamburg HRB 127591, Amtsgericht Hamburg | Ust-IdNr.: DE289113521 | Geschäftsführer: Jens Törper, Uwe Schäfer Save a tree – think before you print. -Ursprüngliche Nachricht- Von: Dirk Forchel [mailto:dirk.forc...@exedio.com] Gesendet: Donnerstag, 16. November 2017 18:19 An: users@wicket.apache.org Betreff: Nested forms in WizardStep Currently we use the Wizard/WizardStep classes from wicket-extensions to set required data for an object (in our case a checkout process with some user Information, e.g. addresses etc.). The first step contains a Login form with two "required" input components for the credentials and a separate "Login" button and a Panel with two ratio buttons where the user must decide whether to go on without login (anonymous) or to register a new user account. Only the values for the ratio buttons should be triggered by this step with the "next" button. The Login itself should be triggered with the additional "login" button which is not part of the ButtonBar. As far as I know it's not good to have nested forms. We don't need to have forms inside our steps actually, since the Wizard itself has a form already. I've noticed that if the user hits the "next" button, the form validation for the login form ist triggered as well, but it should not. The form processing for the login form should actually not part of step, but the "login container" must be part of the view. What is the best solution to implement this scenario? I implemented the step without an additional form component and used an AjaxButton. In AjaxButton#onSubmit I implemented the authentication stuff. But further on I got some problems with updating the current state and how to go on to the next step. Also I've noticed, that pressing the "next" button would require some input for the credentials. So I'm a bit confused now. I hope, I could express myself clearly. Could someone give me some hint? Thank you very much. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org