In this section of Wicket tutorial we are going to describe you how the ajax lazy load component can be added into your application to make your application much effective.
In this application we are using three of the files as:
LazyLoadApplication calls LazyLoad class which is responsible for rendering the lazy load component on the HTML file.
LazyLoadApplication.java
package com.roseindia.wicket;
|
LazyLoad.java
package com.roseindia.wicket;
|
LazyLoad.html
<html>
|
One most important thing is to make entry of LazyLoadApplication class into the web.xml file. These entry lines are as follows:
| <filter> <filter-name>LazyLoadApplication</filter-name> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> <init-param> <param-name>applicationClassName</param-name> <param-value>com.roseindia.wicket.LazyLoadApplication</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> </filter> <filter-mapping> <filter-name>LazyLoadApplication</filter-name> <url-pattern>/wicket/lazy/*</url-pattern> </filter-mapping> |
Output:

Here is the page view after lazy loading.

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Lazy Load Application example in Wicket
Post your Comment