MarkupNotFoundException
Hi. I have a class IpLookupPage that uses markupinheritence and inherits a class called BasePage. I is working fine when i test it manually but when i am using testng to do unit testing on the page i get an exception. The code looks like: ApplicationContext context = getStubApplicationContextForPage(); BossoWicketTester app = createWicketTester(context); app.openPage(IpLookupPage.class); And i get this error message: org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'com.ongame.bo.bofraud.markup.pages.IpLookupPage' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried: [Page class = com.ongame.bo.bofraud.markup.pages.IpLookupPage, id = 0, version = 0] at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:354) at org.apache.wicket.Page.onRender(Page.java:1435) at org.apache.wicket.Component.render(Component.java:2266) at org.apache.wicket.Page.renderPage(Page.java:891) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1100) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:382) at com.ongame.bo.bofraud.WicketApplicationTest$BossoWicketTester.openPage(WicketApplicationTest.java:101) at com.ongame.bo.bofraud.markup.pages.IpLookupPageTest.testInvalidIpAddress(IpLookupPageTest.java:68) Caused by: org.apache.wicket.markup.MarkupNotFoundException: Markup not found. Component class: com.ongame.bo.bofraud.markup.pages.IpLookupPage Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:215) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:342) ... 33 more ... Removed 21 stack frames Anyone that knows what the problem is? Regards Alex -- View this message in context: http://www.nabble.com/MarkupNotFoundException-tp17142219p17142219.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Open new window or tab with setResponsePage
Thanks! I've tried this but can't figure out how to pass parameters to the popup from a form. Any ideas? /Alex martin-g wrote: use Link with PopupSettings I think there is an example for this in wicket-examples On Tue, 2008-05-06 at 03:11 -0700, AlexTM wrote: Is it possilble to use setResponsePage to redirect to a new window or tab in the browser? Regards Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Open-new-window-or-tab-with-setResponsePage-tp17079750p17100203.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Open new window or tab with setResponsePage
Is it possilble to use setResponsePage to redirect to a new window or tab in the browser? Regards Alex -- View this message in context: http://www.nabble.com/Open-new-window-or-tab-with-setResponsePage-tp17079750p17079750.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Display a String when null
Hi! I'm quite new to Wicket and help with something easy, i guess. I'm displaying some info on my page: add(new Label(country, new PropertyModel(this, ipLocationInfo.country))); The country information is sometimes null and then i would like to display unknown instead. Is this easily managed or do i have to change the country value of the ipLocationInfo object? Regards Alex -- View this message in context: http://www.nabble.com/Display-a-String-when-null-tp17062912p17062912.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display a String when null
Thanks! The problem is that the opLocationInfo has ten (10) different Strings that may be null so is there a generic solution to it? /Alex Vit Rozkovec wrote: Hi! Maybe there is a better way, but I would do: add(new Label(country, new PropertyModel(this, ipLocationInfo.country) { @Override public Object getObject() { String country = (String) super.getObject(); country = country == null ? unknown : country; return country; } })); Vitek AlexTM wrote: Hi! I'm quite new to Wicket and help with something easy, i guess. I'm displaying some info on my page: add(new Label(country, new PropertyModel(this, ipLocationInfo.country))); The country information is sometimes null and then i would like to display unknown instead. Is this easily managed or do i have to change the country value of the ipLocationInfo object? Regards Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Display-a-String-when-null-tp17062912p17063364.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]