...
If you are using Java 6 or newer, than Wicket will be configured to use java.util.Properties#load(Reader(in, "utf-8"))
for files with "*.utf8.properties" extension.
XML based property files
The file extension for xml based property files is changed from .xml to .properties.xml.
This way it is possible to use pages with XML markup type and xml based property files. Part of WICKET-2035.
TabbedPanel
- ITab.getPanel() now returns WebMarkupContainerWithAssociatedMarkup instead of Panel so it is now possible to create tabs using Fragments or Panels rather then just Panels.
- TabbedPanel.setSelectedTab() is now chainable
- TabbedPanel now takes a List<? extends ITab> rather then List<ITab>
...
Code Block | ||||
---|---|---|---|---|
| ||||
public MyRequestCycle extends WebRequestCycle { @Override public void onBeginRequest() { //... } @Override public void onEndRequest() { //... } @Override public Page onRuntimeException(Page page, RuntimeException e) { // ... } } |
...
getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl() has been replaced
With https://issues.apache.org/jira/browse/WICKET-3028 and https://issues.apache.org/jira/browse/WICKET-3021
this method was replaced. The timestamp, which previously was added as a query parameter to the resource url is now part of the file's basename (the name part before the extension). This has several advantages and gives you best possible caching support. See for example chapter
Use fingerprinting to dynamically enable caching
in
http://code.google.com/intl/de-DE/speed/page-speed/docs/caching.html
The feature is enabled by default so unless you want to disable it with getResourceSettings().setUseTimestampOnResources(boolean)
or query its state with getResourceSettings().getUseTimestampOnResources()
you usually don't have to care about it at all. Timestamping only works when the ResourceReference supports a last modified timestamp and returns a non-null timestamp for method ResourceReference.getLastModified()
. This is always true for package resources and wicket:link
.
...
Code Block |
---|
/** * Objects that can send events * * @author Igor Vaynberg (ivaynberg) */ public interface IEventSource { /** * Sends an event * * @param <T> * tyep of payload * * @param sink * object that will receive the event * @param broadcast * if the object that receives the event needs to broadcast it to others, this is the * type of broadcast that should be used * @param payload * event payload */ <T> void send(IEventSink sink, Broadcast broadcast, T payload); } |
...
Code Block |
---|
/** * Objects that can receive events * * @author Igor Vaynberg (ivaynberg) */ public interface IEventSink { /** * Called when an event is sent to this sink * * @param event */ void onEvent(IEvent<?> event); } |
...
The mechanism allows for different event broadcast methods defined here:
Code Block |
---|
/** * Defines the event broadcast type. * * @author igor */ public enum Broadcast { /** * Breadth first traversal. Supported sinks in order of traversal: * * <ol> * <li>{@link Application}</li> * <li>{@link Session}</li> * <li>{@link RequestCycle}</li> * <li>{@link Page}</li> * <li>{@link Component}s</li> * </ol> * * Any sink along the path can be specified and traversal will start with the specified sink as * root, eg: * * <ul> * <li>If a component inside the page is specified then only the component and all its children * will receive the event</li> * <li>If Session is specified then the session, the request cycle, the page and all its * components will receive the event</li> * </ul> */ BREADTH, /** * Depth first traversal. Supported sinks in order of traversal: * * <ol> * <li>{@link Component}s</li> * <li>{@link Page}</li> * <li>{@link RequestCycle}</li> * <li>{@link Session}</li> * <li>{@link Application}</li> * </ol> * * Any sink along the path can be specified and traversal will start with the specified sink as * root, eg: * * <ul> * <li>If a component inside the page is specified then only the component and all its children * will receive the event</li> * <li>If Session is specified then the session, the request cycle, the page and all its * components will receive the event</li> * </ul> * */ DEPTH, /** * A bubble-up traversal. In a bubble-up traversal only the sink and its parents are notified. * * Supported sinks in order of traversal are: * <ol> * <li>{@link Component}s</li> * <li>{@link Page}</li> * <li>{@link RequestCycle}</li> * <li>{@link Session}</li> * <li>{@link Application}</li> * </ol> * * Any sink along the path can be specified and traversal will start at the specified sink and * work its way up to the {@link Application}, eg: * * <ul> * <li>If a component inside the page is specified then only the component, its parents, the * request cycle, the session, and the application will be notified. * <li>If Session is specified then the session, the application will be notified</li> * </ul> */ BUBBLE, /** * Only the specified sink receives the event */ EXACT; } |
...