-
Notifications
You must be signed in to change notification settings - Fork 298
Wicket7
The Wicket7 project provides implementations of Wicket core interfaces based on JDK7 goodies.
This is an extension of the standard org.apache.wicket.util.watch.ModificationWatcher that adds the ability to be notified when a new file appears in the classpath.
If org.apache.wicket.markup.MarkupCache is asked for a markup file (e.g. .html) and this file doesn't exists then it will add a special entry in its internal cache implementation that will mark this markup file as not existing and next request for this markup file will use that entry in the cache and wont check in the file system. If later the developer provides this markup file he needs to notify MarkupCache about it. Until now the only way is to clear the whole MarkupCache through JMX.
org.wicketstuff.wicket7.util.watch.Nio2ModificationWatcher uses JDK7 NIO2 to watch the classpath for newly created files. Upon notification it invalidates the entry in the MarkupCache.
public class MyApplication extends WebApplication {
protected void init() {
super.init();
getResourceSettings().setResourceWatcher(new Nio2ModificationWatcher(this));
}
}
- wicketstuff-wicket7
There is no maven stable build yet.
<dependency>
<groupId>org.wicketstuff</groupId>
<artifactId>wicketstuff-wicket7</artifactId>
<version>6.0-SNAPSHOT</version>
</dependency>
<repository>
<id>wicketstuff-core-snapshots</id>
<url>ttps://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Apache 2.0.