The first wicket Hellol world error can not determine Markup. Component is isn't yet connected to a parent.

Source: Internet
Author: User


This year for the first time using wicket to develop a Web site to play, from the Apache website download wicket 8.0, and then download the corresponding PDF Official document, copy hellowrold, found irrelevant. 8.0 does not support the import package in the document. It's strange, strange, weird. Maybe that's why wicket can't fire.
Why use wicket? That's because I'm the old Delphi,c++builder. rad tool Users and VB users, for spring MVC deep pain, so backward, so primitive, so repetitive, so much configuration. Plainly, MVC is the same as Visual C + + under Windows.



Use Netbean 8.0 +jdk 8+tomcat8.0+mavn+wicket Plugin today



Using the Netbean Manv+wicket plug-in method is easy to do, and can run normally. If you are using Maven to download wicket 6来 programming, you cannot run the following problems
Unexpected RuntimeException



Last Cause:can is not determine Markup. Component is isn't yet connected to a parent. [Page class = com.shark.wicket.java.Controll.HomePage, id = 0, render count = 1]



StackTrace



Root Cause:



Org.apache.wicket.markup.MarkupNotFoundException:Can not determine markup. Component is isn't yet connected to a parent. [Page class = com.shark.wicket.java.Controll.HomePage, id = 0, render count = 1]
At Org.apache.wicket.Component.getMarkup (component.java:750)
At Org.apache.wicket.Component.internalRender (component.java:2332)
At Org.apache.wicket.Component.render (component.java:2295)
At Org.apache.wicket.Page.renderPage (page.java:1024)
At Org.apache.wicket.request.handler.render.WebPageRenderer.renderPage (webpagerenderer.java:139)
At Org.apache.wicket.request.handler.render.WebPageRenderer.respond (webpagerenderer.java:284)
At Org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond (renderpagerequesthandler.java:175)



Baidu has a relatively small number of related issues, repeatedly checking the WEB. XML appliacation. JAVA; Homepage. Java.
It's not a problem to copy the document.
From an English BBS to get inspiration, it said that Homepage.java can not find Wicket:id. Then carefully contrasting the HTML ID and the return ID in Java is really always.



Then think of running down the wicket plug-in project, incredibly still good, whether the two can be controlled. Randomly controlled, the target structure was found to be different.
Wicket plugin, HTML is placed under src/main/resources with the same name as the package.
I think they are in the same directory as Java, in a package, but the display is not the same way. In a careful comparison, JAVA source code in src/main/java/the same name package directory.



OK, I'll put the HTML in the resource bundle path first. The result is not abnormal, the normal operation is good.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.