DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Frameworks
  4. Wicket 6.0 Brings Out of The Box JQuery And More

Wicket 6.0 Brings Out of The Box JQuery And More

James Sugrue user avatar by
James Sugrue
CORE ·
Sep. 05, 12 · Interview
Like (0)
Save
Tweet
Share
7.40K Views

Join the DZone community and get the full member experience.

Join For Free

Apache Wicket 6.0 gets released today, with a number of enhancements that make it one of the most compelling choices for web development in Java. With JQuery integration provided out of the box, improvements throughout the client side API, and an experimental WebSocket implementation, this should be a popular upgrade for Wicket users.

"This release delivers a reinvigorated implementation of our client side API that enables developers to integrate rich JavaScript libraries and components with minimal effort. We have updated and broadened the capability and flexibility of many existing features throughout the framework," said Martijn Dashorst, Vice President of Apache Wicket.

Here's a quick rundown on what's included.

JQuery Now Available Out-Of-The-Box

Wicket's custom AJAX JavaScript library has been re-implemented using JQuery, so it will be easier to integrate JQuery plugins into Wicket applications. Of course, it's still possible to use your own version of JQuery if required.

AJAX Attributes

With the new and improved AJAX implementation, you can alter any aspect of an AJAX request through AjaxRequestAttributes. For example you can specify that the request should be executed using POST instead of GET, or that the AJAX request should be multi-part, etc. See the migration guide or the JavaDoc of AjaxRequestAttributes for all possible options.

Browser event registration replaces inline events

Wicket now uses JavaScript event registration instead of inline attributes for AJAX components. This enables multiple event listeners to be attached to a markup tag, cleans up the rendered markup considerably and reduces the amount of generated markup.

IDataProvider now uses long instead of int

The IDataProvider<T> interface and implementations now use long instead of int for index and size parameters to better line up with the Java Persistence API and other persistency frameworks. Big data is now possible with Wicket!

${label} replaces ${input} in feedback messages

Previous Wicket versions used the input that was provided by users in error messages when validations failed. This led to error messages like "1234a is not a valid number". In Wicket 6 the feedback messages use the label of the invalid form component instead. You can set the label by calling setLabel() on the form component. If no label is provided, Wicket defaults to displaying the component identifier. This changes the error message to "Phonenumber is not a valid number".

Resources can declare dependencies - It is now much easier to create resource contributions with dependencies, for example a JQuery plugin can declare a dependency on JQuery and other resources such as embedded style sheets. Users of such resources don’t have to provide these dependencies themselves, and the dependencies are linked in the appropriate order.
Packaged resources will use minimized version automatically - When a minimized JavaScript resource is available (filename.min.js – add the .min part to the filename before the extension), Wicket will automatically use the minimized version when running in deployment mode, while using the non-minimized version for development mode.

OSGi compatible packaging

Wicket's packaging has been made compatible with OSGi bundles by moving some classes to different packages. The full list can be found in our migration guide. This makes it much easier to deploy Wicket applications in an OSGi environment

Experimental websocket implementations

This release also includes two experimental websocket implementations: one using Atmosphere as a bridge for browsers and containers that don’t support websockets natively and one for containers and browsers that have native websocket support.

Java 6 As Minimum Required Version

If your existing Wicket application has been using an earlier Java version, and you want to take advantage of Wicket 6.0 features, you'll need to upgrade your Java runtime too.


The headline features include

  • Out-of-the box JQuery integration
  • Complete control over AJAX requests
  • Improved event registration in browsers
  • Support for large datasets in components
  • Dependency management for client side JavaScript libraries
  • Experimental support for WebSockets

The complete set of changes is available in the migration guide at http://s.apache.org/wicket-6.0-migration

 

JQuery

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Real-Time Stream Processing With Hazelcast and StreamNative
  • AWS Cloud Migration: Best Practices and Pitfalls to Avoid
  • How to Secure Your CI/CD Pipeline
  • 5 Factors When Selecting a Database

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: