Re: Browser Back Button and WicketTester
Does WicketTester emulate the browser back button? E.g. Please take a look at http://wicketpagetest.sourceforge.net which supports the back button. -- Kent Tong Useful news for software developers at http://www2.cpttm.org.mo/cyberlab/softdev/newsletter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Form in a Wizard is not showing state of the Model
Can anyone help Am using the Wicket wizard from the extensions package. Have extended Wizard and WizardStep - nothing fancy, and the wizard flow is working. Problem is this: I have a Model which is passed into the constructor of each step. The first page of the wizard displays one of the fields of the Model in a Form. When I move to Step 2 and then back to Step1, the field is empty. The debugger reveals the following: The Model is getting updated correctly, and remains correct in Step 2. When going back to Step1, the Model is also correct in onBeforeRender(). However, the new value the field is set to in the Model does not appear in the form. Here are the Wizard and WizardStep (1) classes - any help is much appreciated! public class TransferMoneyWizard extends AbstractWizard { private static final long serialVersionUID = 6808247888274682077L; public TransferMoneyWizard(String id) { super(id); // Create model CompoundPropertyModel model = new CompoundPropertyModel(new AccountTransferModel()); // Create wizard steps WizardModel wizardModel = new WizardModel(); wizardModel.add(new TransferMoneyStep1(one, first, model)); wizardModel.add(new TransferMoneyStep2(two, second, model)); wizardModel.add(new TransferMoneyStep3(three, third, model)); // Initialize model init(wizardModel); } @Override public void onCancel(){ setResponsePage(getApplication().getHomePage()); } @Override public void onFinish(){ setResponsePage(getApplication().getHomePage()); } } public class TransferMoneyStep1 extends BHPWizardStep{ private static final long serialVersionUID = -3964976234505273151L; private Form form; private CompoundPropertyModel model; public TransferMoneyStep1(String title, String summary, CompoundPropertyModel model) { super(title, summary, model); this.model = model; form = new Form(form, model); form.add(new TextArea(comments, new PropertyModel(model, comments))); add(form); } @Override protected void onBeforeRender() { super.onBeforeRender(); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-in-a-Wizard-is-not-showing-state-of-the-Model-tp2292627p2292627.html Sent from the Wicket - User 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: Form in a Wizard is not showing state of the Model
I am not sure whether this will help but try it - remove the Form from your code, Wizard has its own form that wraps the steps. On Sat, 2010-07-17 at 12:23 -0700, drf wrote: Can anyone help Am using the Wicket wizard from the extensions package. Have extended Wizard and WizardStep - nothing fancy, and the wizard flow is working. Problem is this: I have a Model which is passed into the constructor of each step. The first page of the wizard displays one of the fields of the Model in a Form. When I move to Step 2 and then back to Step1, the field is empty. The debugger reveals the following: The Model is getting updated correctly, and remains correct in Step 2. When going back to Step1, the Model is also correct in onBeforeRender(). However, the new value the field is set to in the Model does not appear in the form. Here are the Wizard and WizardStep (1) classes - any help is much appreciated! public class TransferMoneyWizard extends AbstractWizard { private static final long serialVersionUID = 6808247888274682077L; public TransferMoneyWizard(String id) { super(id); // Create model CompoundPropertyModel model = new CompoundPropertyModel(new AccountTransferModel()); // Create wizard steps WizardModel wizardModel = new WizardModel(); wizardModel.add(new TransferMoneyStep1(one, first, model)); wizardModel.add(new TransferMoneyStep2(two, second, model)); wizardModel.add(new TransferMoneyStep3(three, third, model)); // Initialize model init(wizardModel); } @Override public void onCancel(){ setResponsePage(getApplication().getHomePage()); } @Override public void onFinish(){ setResponsePage(getApplication().getHomePage()); } } public class TransferMoneyStep1 extends BHPWizardStep{ private static final long serialVersionUID = -3964976234505273151L; private Form form; private CompoundPropertyModel model; public TransferMoneyStep1(String title, String summary, CompoundPropertyModel model) { super(title, summary, model); this.model = model; form = new Form(form, model); form.add(new TextArea(comments, new PropertyModel(model, comments))); add(form); } @Override protected void onBeforeRender() { super.onBeforeRender(); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Maven archetype and tomcat:run
Hello all: I am trying to run tomcat from maven and including openEJB. The command I am using to run tomcat: mvn tomcat:run The error I am getting : Jul 18, 2010 6:53:29 AM org.apache.catalina.startup.Embedded start INFO: Starting tomcat server Jul 18, 2010 6:53:29 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.26 Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter wicket.site java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter cannot be cast to javax.servlet.Filter at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.startup.Embedded.start(Embedded.java:825) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:533) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:239) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart So I created a webapp project from maven archetype, and added openEjb dependency: dependency groupIdorg.apache.openejb/groupId artifactIdopenejb-core/artifactId version3.1.2/version /dependency The error I am getting now is: Jul 18, 2010 7:02:37 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/jasper/servlet/JasperLoader) previously initiated loading for a different type with name javax/servlet/http/HttpServletRequest at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2444) at java.lang.Class.getDeclaredMethods(Class.java:1808) at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:226) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:148) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at