Re: 1.5: wicketester with navomatic border: path not found.
Thanks. Hmm than what should the path be for the formTester. I know i have to add to the body for the new navomaticBorder.addToBody("loginBody"); but if the path changes.. how would i get the path for the form tester to work. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-wicketester-with-navomatic-border-path-not-found-tp3823023p3823911.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
1.5: wicketeser with navomatic border: path not found.
Hi iam getting error in my test case. I have the standard navomaticborder file with addToBorder("navigationBorder") and addToBorder("bodyBorder"); my test contains: this.tester.startPage(LoginPage.class); final FormTester formTester = this.tester.newFormTester("loginBody:signInPanel:signInForm"); my login page extends WebPage with this constructor: public LoginPage() { super(); final NavomaticBorder loginBody = new NavomaticBorder("loginBody"); final SignInPanel panel = new SignInPanel("signInPanel"); this.addOrReplace(loginBody .addOrReplace(panel) .addOrReplace(new FeedbackPanel("feedback", new ContainerFeedbackMessageFilter(panel)).setOutputMarkupId(true))); } path: 'loginBody:signInPanel:signInForm' does not exist for page: LoginPage This work in 1.4.18 but no in 1.5 What went wrong? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5-wicketeser-with-navomatic-border-path-not-found-tp3823023p3823023.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
Wicket 1.4.18: Performance of unit test observation.
Hi can someone explain to me why performance of unit testing is faster using setUp and destory this way. @Before public void setup() { if (this.authenticatedWebApp == null) { this.authenticatedWebApp = new AuthenticatedTestApplication(); } if (this.tester == null) { this.tester = new WicketTester(this.authenticatedWebApp); } else { this.tester.setupRequestAndResponse(true); } } @After public void tearDown() { if (this.tester != null) { this.tester.destroy(); } } It runs my test case within 2 seconds compare to 25 seconds for this below @Before public void setup() { this.authenticatedWebApp = new AuthenticatedTestApplication(); this.tester = new WicketTester(this.authenticatedWebApp); } @After public void tearDown() { this.tester = null; this.authenticatedWebApp = null; } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-18-Performance-of-unit-test-observation-tp3756900p3756900.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: org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;
Hi Martin, yesterday that was the domain (persistent object was called User). The command object was call Account hence AccountCommand. Anyways I solve my problem by adding a additional parameter. new DropDownChoice("userChoice", new CompoundPropertyModel(selectedUser), new ListModel(users), new ChoiceRenderer("userName", "userName")); This solve the problem. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-No-get-method-defined-for-class-class-java-lang-String-expr-tp3459462p3465163.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: org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;
final LoadableDetachableModel accountCommand = new AccountDetachableModel(userId, personId); final AccountForm form = new AccountForm("accountForm", accountCommand); My AccountCommand { private Integer userId; private Integer accountId; private String accountName; private String accountFN; private String accountLN; } it does not have userName field since the userName getters is on the User domain object not Account command object. My AccountDetachableModel is just @Override protected AccountCommand load() { AccountCommand accountCommand = new AccountCommand(); // query id and set the account command field. return accountCommand; } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-No-get-method-defined-for-class-class-java-lang-String-expr-tp3459462p3462988.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
org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName;
Hi I have the following domain object public class User { private String email; private String firstName; private String lastName; private Account account; public String getUserName() { return this.account.getName(); } public void setUserName(String username) { this.account.setName(username); } } I have a form with dropdownchoice. final DropDownChoice userChoice = new DropDownChoice("userChoice", new ListModel(users), new ChoiceRenderer("userName", "userName")); When the page loads i get this error! org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: userName at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:492) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:332) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:242) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:95) at org.apache.wicket.markup.html.form.ChoiceRenderer.getIdValue(ChoiceRenderer.java:145) at org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:166) at org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:879) at org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:353) at org.apache.wicket.Component.renderComponent(Component.java:2690) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539) at org.apache.wicket.Component.render(Component.java:2521) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528) at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:2012) at org.apache.wicket.Component.renderComponent(Component.java:2690) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539) at org.apache.wicket.Component.render(Component.java:2521) at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.resolve(Border.java:421) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:65) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1445) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528) at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:403) at org.apache.wicket.Component.renderComponent(Component.java:2690) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539) at org.apache.wicket.Component.render(Component.java:2521) at org.apache.wicket.markup.html.border.Border.resolve(Border.java:287) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:65) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1445) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1528) at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:403) at org.apache.wicket.Component.renderComponent(Component.java:2690) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539) at org.apache.wicket.Component.render(Component.java:2521) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:697) at org.apache.wicket.markup.html.border.Border.onComponentTagBody(Border.java:328) at org.apache.wicket.Component.renderComponent(Component.java:2690) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539) at org.apache.wicket.Component.render(Component.java:2521) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1604) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:697) at org.apache.wicket.markup.html.border.Border.onComponentTagBody(Border.java:328) at org.apache.wicket.Component.renderComponent(Component.java:2690) at org.apache.wicket.Markup
Re: wicket 1.4.12 cannot cast to org.apache.wicket.protocol.http.WebApplication
Thanks anyways, i found out my problem has nothing to do with wicket at all but rather my tomcat class loader and other related stuff. I had to move slf4j , log4j jar file out of standard webapp during deployment and put them in tomcat/lib folder. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-12-cannot-cast-to-org-apache-wicket-protocol-http-WebApplication-tp2965438p3004617.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: wicket 1.4.12 cannot cast to org.apache.wicket.protocol.http.WebApplication
Thanks martin: however all of them unfortuantely is at 1.4.12 wicket-ioc wicket-spring wicket wicket-auth-roles. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-12-cannot-cast-to-org-apache-wicket-protocol-http-WebApplication-tp2965438p2967100.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
wicket 1.4.12 cannot cast to org.apache.wicket.protocol.http.WebApplication
Hi i have the following in my web.xml wicket.filter org.apache.wicket.protocol.http.WicketFilter applicationFactoryClassName org.apache.wicket.spring.SpringWebApplicationFactory applicationBean authenticatedApplication configuration deployment contextConfigLocation classpath:applicationContext.xml in my applicationContext.xml i have this define my MyAuthenticatedApplication extends AuthenticatedWebApplication ... so i get this error. java.lang.ClassCastException: $Proxy35 cannot be cast to org.apache.wicket.protocol.http.WebApplication at org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:150) at org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:143) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:706) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:287) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4651) 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:445) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) What is wrong? i am using wicket-ioc 1.4.12 and wicket-auth-roles 1.4.12. P.S. i already try applicationClassName with value of com.myapp.MyAuthenticatedApplication and i get no bean of type org.apache.wicket.protocol.http.WebApplication found. Thanks, Chun Ping Wang. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-1-4-12-cannot-cast-to-org-apache-wicket-protocol-http-WebApplication-tp2965438p2965438.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