|
FAQs has been edited by Erik van Oosten (Jan 17, 2008). Content:What, you want answers too? This page addresses general FAQ's. More specific FAQ's can be found in the FAQ Category Table of contents
Wicket architectureWhat about performance and scalability?Wicket performance is actually quite good under stress. Remember though that in many real-world application your bottleneck will be in business or database layer. Wicket benchmark can be found here: wicket-1.3.x-benchmark You should also search wicket-user mailing list for performance MavenHow do I skip the tests when doing a Maven build?Add a -Dmaven.test.skip=true parameter to your Maven command line. Other information about building wicket can be found on the Wicket from source page. Is Wicket available in the central Maven 2 repository?Yes, it is. However, we must rely on the Maven project to update their repository with the latest releases, resulting in some lag. If you need them hot and fresh, you can use the wicket-stuff's Maven 2 repository by adding the the following to your project's pom.xml: <repositories> <repository> <id>org.wicketstuff</id> <name>Wicket Stuff Repo</name> <url>http://wicketstuff.org/maven/repository</url> </repository> </repositories>
Wicket.replaceOuterHtml gives weird result on FirefoxThere are certain cases when you replace markup in FireFox where some of the nodes are not placed right in the DOM tree. This happens when the markup is invalid, e.g. you have somewhere a block element inside an inline element, such as <table> or <div> in <span>. Wicket communityWhat do you look like?You can see some of the Wicket committers in action at the Wicket gathering MiscellaneousWhat is the meaning of life, the universe and everything?42 DeploymentMy application says "DEVELOPMENT MODE", how do I switch to production?Add the following to your web.xml, inside your <servlet> mapping (or <filter> mapping if you're using 1.3.x): <init-param> <param-name>configuration</param-name> <param-value>deployment</param-value> </init-param> You can alternatively set this as a <context-param> on the whole context. Another option is to set the "wicket.configuration" system property to either "deployment" or "development". The value is not case-sensitive. The system property is checked first, allowing you to add a web.xml param for deployment, and a command-line override when you want to run in development mode during development. You may also override Application.getConfigurationType() to provide your own custom switch, in which case none of the above logic is used. See WebApplication.getConfigurationType() for the default logic used above. How do I know in what mode (DEVELOPMENT/DEPLOYMENT) my application runs?As of Wicket 1.3.0, you can call Application.getConfigurationType(). Prior to that, there is no flag telling you in which mode you are. If you want a flag subclass Application.configure() store the "configurationType" parameter in a variable. if (DEVELOPMENT.equalsIgnoreCase(configurationType)) { log.info("You are in DEVELOPMENT mode"); getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); getDebugSettings().setComponentUseCheck(true); getDebugSettings().setSerializeSessionAttributes(true); getMarkupSettings().setStripWicketTags(false); getExceptionSettings().setUnexpectedExceptionDisplay( UnexpectedExceptionDisplay.SHOW_EXCEPTION_PAGE); getAjaxSettings().setAjaxDebugModeEnabled(true); } else if (DEPLOYMENT.equalsIgnoreCase(configurationType)) { getResourceSettings().setResourcePollFrequency(null); getDebugSettings().setComponentUseCheck(false); getDebugSettings().setSerializeSessionAttributes(false); getMarkupSettings().setStripWicketTags(true); getExceptionSettings().setUnexpectedExceptionDisplay( UnexpectedExceptionDisplay.SHOW_INTERNAL_ERROR_PAGE); getAjaxSettings().setAjaxDebugModeEnabled(false); } I get 'Internal error cloning object' errorsThis is a debug feature to help find potential problems when the application runs clustered. It checks the component graphs to make sure everything is serializable (which is required for clustering). If clustering support is not needed, these checks can be disabled by doing getDebugSettings().setSerializeSessionAttributes(false); in the application.init() Also, if the configuration parameter in the web.xml is set to DEPLOYMENT, these checks are disabled. Answer provided courtesy Igor Vaynberg VersioningWicket stores versions of pages to support the browser's back button. Because this concept is difficult to understand, we'll present a simple use case that describes the problem and how versioning helps. Suppose you have a paging ListView with links in the ListItems, and you've clicked through to display the third page of items. On the third page, you click the link to view the details page for that item. Now, the currently available state on the server is that you were on page 3 when you clicked the link. Then you click the browser's back button twice (i.e. back to list page 3, then back to list page 2, but all in the browser). While you're on page 2, the server state is that you're on page 3. Without versioning, clicking on a ListItem link on page 2 would actually take you to the details page for an item on page 3. (This was taken from an IRC discussion with Martijn.) How does Wicket know when a new browser window is opened?Wicket uses the _javascript_ window.name property to detect if a new window (or tab) was opened. This property is blank by default . How do I provide the page map for bookmarkable pages?You do this by providing it as part of the URL. How exactly this looks depends on the 'encoding' of the request. The common cases are (myPageMap is the page map):
What is the future of onAttach and onDetach methods?Igor Vaynberg in wicket-dev: We are trying to consolidate the methods. We have a bunch of Doing it like it has been done doesn't work. users assume onattach() is a if i create a custom component and do something in onattach(), then the user Unfortunately the only way to do that at this point and keep the same OT there is a JSR for software defect annotations that includes something How can I use wicket to develop webapps that target mobile devices?Write clean HTML with CSS targeted toward the various mobile clients that you wish to support. More info can be found on the Mobile Devices page. How to repaint a (List/Grid/Data/Repeating)View via Ajax? |
Unsubscribe or edit your notifications preferences
