[CONF] Apache Wicket Migration to Wicket 6.0
Sven Meier bearbeitete die Seite: Migration to Wicket 6.0 Migrating to Wicket 6.0 Inhalt minLevel 3 Environment Wicket 6.0 requires at least Java 6 ... `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag MinimumValidator and MaximumValidator are replaced by RangeValidator.minimum and RangeValidator.maximum respectively `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+.variant), now you can do new ValidationError(validator, variant). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do Codeblock class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) {
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Daniel Huang Changes (1) ... AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); {code} RequestCycle.get().find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. h3. IHeaderResponse, including decorators and filters ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} added onAfterSubmit to Buttons and SubmitLinks Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource ResourceStreamLocator and ResourceFinder have been cleaned up Minor changes Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag MinimumValidator and MaximumValidator are replaced by RangeValidator.minimum and RangeValidator.maximum respectively `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Bertrand Guay-Paquet Changes (1) ... * `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag * {{MinimumValidator}} and {{MaximumValidator}} are replaced by {{RangeValidator.minimum}} and {{RangeValidator.maximum}} respectively * `AbstractValidator` has been removed * `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+.variant), now you can do new ValidationError(validator, variant). ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} added onAfterSubmit to Buttons and SubmitLinks Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource ResourceStreamLocator and ResourceFinder have been cleaned up Minor changes Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag MinimumValidator and MaximumValidator are replaced by RangeValidator.minimum and RangeValidator.maximum respectively `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by selckin Changes (1) ... * IErrorMessageSource#substitute(MapString,Object) was merged into IErrorMessageSource#getMessage(String, MapString,Object) * org.apache.wicket.util.resource.IResourceStreamWriter#write() now works again with java.io.OutputStream as in Wicket 1.4.x. [WICKET-4601|https://issues.apache.org/jira/browse/WICKET-4601] * WicketTester.startPanel - WicketTester.startComponentInPage Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} added onAfterSubmit to Buttons and SubmitLinks Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource ResourceStreamLocator and ResourceFinder have been cleaned up Minor changes Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Carl-Eric Menzel Changes (3) ... Provided that the field has a Number label. h4. onSubmit in Buttons and SubmitLinks has been replaced with onSubmitBefore/AfterForm h4. added onAfterSubmit to Buttons and SubmitLinks The call order of onSubmit in Buttons vs Forms was inconsistent in 1.4, and fixed at Button always comes first in 1.5. Sometimes it is desirable to have the Buttons onSubmit running after the Forms, however. In 6.0, {{IFormSubmitter.onSubmit}} is gone and has been replaced by {{.onSubmitBeforeForm}} and {{.onSubmitAfterForm}}. still fixed at button first. In addition to that, there is now {{.onAfterSubmit}}. Your submitting component can implement either one of them or even both. Both will be called after the validation and form model update, just like onSubmit before. The only difference is that you can now pick whether something should happen before or after {{Form.onSubmit}}. h3. Ajax ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} added onAfterSubmit to Buttons and SubmitLinks Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Minor changes Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Carl-Eric Menzel Changes (1) ... This behavior can be configured with org.apache.wicket.settings.IResourceSettings#setUseMinifiedResources(boolean). h3. ResourceStreamLocator and ResourceFinder have been cleaned up The responsibilities of ResourceStreamLocator and IResourceFinder have been untangled and cleaned. * ResourceStreamLocator now purely generates pathnames using a ResourceNameIterator and then uses a list of IResourceFinders to actually get those resources. * ResourceStreamLocator no longer does resource loading from the classpath on its own. Instead, there is now ClassPathResourceFinder. * IResourceSettings no longer contains just a single ResourceFinder but rather a list of them that will be tried in the given order. * Path and WebApplicationPath no longer extend each other, and also no longer have a list of prefixes, only a single one. If you need several path prefixes, simply add more Paths, WebApplicationPaths or other IResourceFinder implementations to IResourceSettings#resourcesFinders. * The IResourcePath interface was removed, since each ResourceFinder now only has one path. h3. Minor changes * Files#getLocalFileFromUrl(URL) decodes url before returning file ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} added onAfterSubmit to Buttons and SubmitLinks Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource ResourceStreamLocator and ResourceFinder have been cleaned up Minor changes Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter().
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Carl-Eric Menzel Changes (1) ... Provided that the field has a Number label. h4. onSubmit in Buttons and SubmitLinks has been replaced with onSubmitBefore/AfterForm The call order of onSubmit in Buttons vs Forms was inconsistent in 1.4, and fixed at Button always comes first in 1.5. Sometimes it is desirable to have the Buttons onSubmit running after the Forms, however. In 6.0, {{IFormSubmitter.onSubmit}} is gone and has been replaced by {{.onSubmitBeforeForm}} and {{.onSubmitAfterForm}}. Your submitting component can implement either one of them or even both. Both will be called after the validation and form model update, just like onSubmit before. The only difference is that you can now pick whether something should happen before or after {{Form.onSubmit}}. h3. Ajax ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} onSubmit in Buttons and SubmitLinks has been replaced with onSubmitBefore/AfterForm Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Minor changes Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Sven Meier Comment: minor change in IErrorMessageSource Changes (1) ... * Files#getLocalFileFromUrl(URL) decodes url before returning file * WizardStep header labels encode their model values by default, override WizardStep#getHeader() if you need the old behavior (i.e. model values not encoded) * IErrorMessageSource#substitute(MapString,Object) was merged into IErrorMessageSource#getMessage(String, MapString,Object) Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Minor changes Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decorate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively,
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Comment: WICKET-4535 Changes (1) ... h3. Repeaters * `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages ([WICKET-1175|https://issues.apache.org/jira/browse/WICKET-1175]). * All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property ([WICKET-4535|https://issues.apache.org/jira/browse/WICKET-4535]). In most cases you just have to add *, String* to the previous parameterized type. For example: _IColumnEntity_ becomes _IColumnEntity, String_. But now it is possible to use other type for the sort property than java.lang.String too. h3. Form Processing ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Files#getLocalFileFromUrl(URL) decodes url before returning file Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). All classes in wicket-extensions which are related to repeaters with sorting behavior have improved generics related to the sorting property (WICKET-4535). In most cases you just have to add ', String' to the previous parameterized type. For example: IColumnEntity becomes IColumnEntity, String. But now it is possible to use other type for the sort property than java.lang.String too. Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Changes (1) ... | org.apache.wicket.util.resource.**| org.apache.wicket.core.util.resource.** (OSGi friendly) | | org.apache.wicket.util.string.**| org.apache.wicket.core.util.string.** (OSGi friendly) | | org.apache.wicket.request.UrlEncoder | org.apache.wicket.util.encoding.UrlEncoder | h3. Refactorings ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Files#getLocalFileFromUrl(URL) decodes url before returning file Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events,
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martijn Dashorst Changes (1) ... * In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. h4. Feedback messages now use ${label} instead of ${input} You should use form component.setLabel(...) to provide a good (internationalized) label for your form components such as text fields. If no label is set on your form fields, Wicket will use the component identifier as the label. This will change the feedback messages from: * 12345a is not a valid integer To: * Number is not a valid integer Provided that the field has a Number label. h3. Ajax ... Full Content Migrating to Wicket 6.0 Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use $Unknown macro: {label} instead of $Unknown macro: {input} Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Files#getLocalFileFromUrl(URL) decodes url before returning file Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martijn Dashorst Changes (1) ... * In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. h4. Feedback messages now use \${label} $\{label\} instead of \${input} $\{input\} You should use form component.setLabel(...) to provide a good (internationalized) label for your form components such as text fields. If no label is set on your form fields, Wicket will use the component identifier as the label. This will change the feedback messages from: ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use ${label} instead of ${input} Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Files#getLocalFileFromUrl(URL) decodes url before returning file Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martijn Dashorst Changes (1) ... * In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. h4. Feedback messages now use \${label} instead of \${input} You should use form component.setLabel(...) to provide a good (internationalized) label for your form components such as text fields. If no label is set on your form fields, Wicket will use the component identifier as the label. This will change the feedback messages from: ... Full Content Migrating to Wicket 6.0 Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Feedback messages now use \$Unknown macro: {label} instead of \$Unknown macro: {input} Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference can load a minified version of a package resource Files#getLocalFileFromUrl(URL) decodes url before returning file Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } org.apache.wicket.validation.RawValidationError is introduced. It can be used to bring a raw Serializable object which is registered as FeedbackMessage with org.apache.wicket.Component#error(Serializable). IFormValidator can have its own resource bundle as other IValidator implementations. WICKET-3879 Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Comment: Add an entry about minified aware resource references Changes (1) ... All IInitializer classes configured in wicket.properties are initialized *before* the call to Application#init(). This way the application has the control to re-configure something that comes from external library. [WICKET-4088|https://issues.apache.org/jira/browse/WICKET-4088] h3. PackageResourceReference that can load a compressed version of a package resource org.apache.wicket.resource.MinifiedAwareCssResourceReference and org.apache.wicket.resource.MinifiedAwareJavaScriptResourceReference are introduced. Their usage is the same as _javascript_ResourceReference. The difference is that in development mode they will load _resource.ext_ using the provided name while in production mode they will try to load _resource_*.min*_.ext_ by automatically inserting +.min+ right before the extension. If there is no such resource with that name then it will log a warning and fall back to the non-compressed version. Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() PackageResourceReference that can load a compressed version of a package resource Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlength` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. Ajax Use JQuery as a
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Igor Vaynberg Changes (2) ... * `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag * `AbstractValidator` has been removed * `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier * Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors * `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+.variant), now you can do new ValidationError(validator, variant). * Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do {code} class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) {error.addKey(mystringerror);return error; } } {code} h4. Feedback Storage Refactoring ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier. Before one had to do: new ValidationError().addMessageKey(validator.getClass().getSimpleName()) to construct the default key, now you can simply say new ValidationError(validator) and it will do the above for you. Also, for more specific keys one had to do new ValidationError().addMessageKey(validator.getClass().getSimpleName()+".variant"), now you can do new ValidationError(validator, "variant"). Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors. For example, to add an extra resource key for the error message to StringValidator one can do class MyStringValidator extends StringValidator { ValidationError decoreate(ValidationError error, IValidatable validatable) { error.addKey("mystringerror"); return error; } } Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Sven Meier Comment: tree replacements Changes (1) ... | org.apache.wicket.resource.filtering.HeaderResponseFilteredResponseContainer | org.apache.wicket.markup.head.filter.HeaderResponseContainer | | org.apache.wicket.resource.filtering.* | org.apache.wicket.markup.head.filter.* | | org.apache.wicket.markup.html.tree.* | org.apache.wicket.extensions.markup.html.repeater.tree.* | | org.apache.wicket.extensions.markup.html.tree.* | org.apache.wicket.extensions.markup.html.repeater.tree.* | h3. Refactorings ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Igor Vaynberg Changes (1) ... * Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors h4. Feedback Storage Refactoring * Feedback messages reported against components are now stored in components metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. * Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. * Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. * Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. * In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. h3. Ajax ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Feedback Storage Refactoring Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed o.a.w.Component#onMarkupAttached() has been dropped in favour of o.a.w.Component#onInitialize(). IInitializers are initialized before Application#init() Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Feedback Storage Refactoring Feedback messages reported against components are now stored in component's metadata rather then in session. This will allow them to survive across requests, see WICKET-2705. Previously the cleanup of messages was controlled by RequestCycle#cleanupFeedbackMessages(), now it is controlled by an IFeedbackMessageFilter set via IApplicationSettings#setFeedbackMessageCleanupFilter(). When session and components are detached they will run this filter on any stored messages, all messages accepted by the filter are removed. The default filter will accept any rendered message, so by default feedback messages are removed once rendered. Form components will clear any stored messages when validate() is called. This will remove any unredered, but now stale, messages. Since messages are now stored in session and in component tree retrieving them is not as simple as Session.getFeedbackMessages(). To assist with this common usecase please see FeedbackCollector. In test land cleanup of feedback messages was controlled by RequestCycle#set/isCleanupFeedbackMessagesOnDetach(), but this method is now deprecated. Instead, in testland you can now call WicketTester#cleanupFeedbackMessages() to clean up message just like it would be done at the end of a request. Alternatively, WicketTester#clearFeedbackMessages() can be used to clear all feedback messages. By default WicketTester will not clean any feedback messages. Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Comment: Add a note that AjaxRequestTarget is an interface now Changes (1) ... For more information read [Wicket Ajax|https://cwiki.apache.org/confluence/x/NK2oAQ] h4. AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: {code} AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); {code} RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. h3. IHeaderResponse, including decorators and filters ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed IInitializers are initialized before Application#init() Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. This way if
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Comment: Add a note that AjaxRequestTarget is an interface now Changes (1) ... RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. h4. AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: {code} AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); {code} RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. h3. IHeaderResponse, including decorators and filters ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed IInitializers are initialized before Application#init() Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Comment: Add a note that AjaxRequestTarget is an interface now Changes (1) ... For more information read [Wicket Ajax|https://cwiki.apache.org/confluence/x/NK2oAQ] h4. AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: {code} AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); {code} RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. h3. IHeaderResponse, including decorators and filters ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Ajax Use JQuery as a backing library for Wicket Ajax functionality AjaxRequestTarget is an interface IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed IInitializers are initialized before Application#init() Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax AjaxRequestTarget is an interface o.a.w.ajax.AjaxRequestTarget is an interface now with a default implementation o.a.w.ajax.AjaxRequestHandler. This way it will be possible to replace it with a different implementation, or mock/spy it in tests. This change required to refactor AjaxRequestTarget.get() too. The replacement code is: AjaxRequestTarget target = requestCycle.find(AjaxRequestTarget.class); RequestCycle.find(Class? extends IRequestHandler) can be used to find the currently running or a scheduled IRequestHandler for other types too. IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. This way if
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Emond Papegaaij Changes (1) ... | org.apache.wicket.markup.html.IHeaderResponse | org.apache.wicket.markup.head.IHeaderResponse | | org.apache.wicket.markup.html.internal.HeaderResponse | org.apache.wicket.markup.head.internal.HeaderResponse | | org.apache.wicket.resource.filtering.HeaderResponseContainerFilteringHeaderResponse | org.apache.wicket.markup.head.filter.FilteringHeaderResponse | | org.apache.wicket.resource.filtering.HeaderResponseFilteredResponseContainer | org.apache.wicket.markup.head.filter.HeaderResponseContainer | | org.apache.wicket.resource.filtering.* | org.apache.wicket.markup.head.filter.* | h3. Refactorings ... Full Content Migrating to Wicket 6.0 Environment Repeaters Form Processing Validation Ajax Use JQuery as a backing library for Wicket Ajax functionality IHeaderResponse, including decorators and filters Order of Header contributions and wicket:head package.properties renamed to wicket-package.properties List of renamed classes and methods Refactorings o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed IInitializers are initialized before Application#init() Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. This way if the user application uses a component library and a component (or Page) from the library contributes some resource the user application has the possibility to override this contribution with its own one. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Emond Papegaaij Changes (1) ... h4. Validation * `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead * `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead * `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag * `AbstractValidator` has been removed ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. This way if the user application uses a component library and a component (or Page) from the library contributes some resource the user application has the possibility to override this contribution with its own one. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) org.apache.wicket.markup.html.IHeaderResponse org.apache.wicket.markup.head.IHeaderResponse org.apache.wicket.markup.html.internal.HeaderResponse org.apache.wicket.markup.head.internal.HeaderResponse Refactorings HttpsMapper has been refactored to make subclassing easier o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed These classes were used as
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Comment: Add an entry about the new order of initializing the IInitializers Changes (1) ... These classes were used as placeholders for further optimizations in Components size but were never finished. h3. IInitializers are initialized before Application#init() All IInitializer classes configured in wicket.properties are initialized *before* the call to Application#init(). This way the application has the control to re-configure something that comes from external library. [WICKET-4088|https://issues.apache.org/jira/browse/WICKET-4088] Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. This way if the user application uses a component library and a component (or Page) from the library contributes some resource the user application has the possibility to override this contribution with its own one. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL)
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Changes (1) ... | org.apache.wicket.behavior.SimpleAttributeModifier | org.apache.wicket.AttributeModifier#replace(...) | | org.apache.wicket.request.Url#toAbsoluteString() | org.apache.wicket.request.Url#toString(StringMode.FULL) | | org.apache.wicket.markup.html.IHeaderResponse | org.apache.wicket.markup.head.IHeaderResponse | | org.apache.wicket.markup.html.internal.HeaderResponse | org.apache.wicket.markup.head.internal.HeaderResponse | h3. Refactorings ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. This way if the user application uses a component library and a component (or Page) from the library contributes some resource the user application has the possibility to override this contribution with its own one. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) org.apache.wicket.markup.html.IHeaderResponse org.apache.wicket.markup.head.IHeaderResponse
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Emond Papegaaij Changes (1) ... Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. h3. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. h3. package.properties renamed to wicket-package.properties ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. Order of Header contributions and wicket:head The order of header contributions (including wicket:head) has changed with Wicket 6.0. By default components are visited child-first to contribute to the header. For every component, the header contribution from the markup (wicket:head) is rendered first, followed by header contributions done in the code. This means that headers contributed by the page are rendered at the bottom of the header, where they used to be at the top with Wicket 1.5. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Refactorings
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Changes (1) ... h3. Refactorings * HttpsMapper has been refactored to make subclassing easier h3. o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed These classes were used as placeholders for further optimizations in Components size but were never finished. Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); Custom HeaderResponseDecorators and IHeaderResponseFilters also need to be adjusted for the changed methods. These classes now have only one method for rendering and filtering. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Refactorings HttpsMapper has been refactored to make subclassing easier o.a.w.IComponentSource and o.a.w.ComponentSourceEntry are removed These classes were used as placeholders for further optimizations in Component's size but were never finished. Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Emond Papegaaij Changes (1) ... For more information read [Wicket Ajax|https://cwiki.apache.org/confluence/x/NK2oAQ] h3. IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: {code} response.renderCSSReference(new CssResourceReference(HomePage.class, header.css)); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, page.js)); {code} Needs to be replaced with: {code} response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, header.css))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, page.js))); {code} h3. package.properties renamed to wicket-package.properties ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax IHeaderResponse, including decorators and filters IHeaderResponse has been rewritten to render HeaderItems. All render* methods have been replaced by a single render(HeaderItem) method. HeaderItems can be instantiated using the factory methods in _javascript_HeaderItem, CssHeaderItem, OnDomReadyHeaderItem, OnLoadHeaderItem, OnEventHeaderItem and StringHeaderItem. For example, the following code in renderHead: response.renderCSSReference(new CssResourceReference(HomePage.class, "header.css")); response.renderJavaScriptReference(new _javascript_ResourceReference(HomePage.class, "page.js")); Needs to be replaced with: response.render(CssHeaderItem.forReference(new CssResourceReference(HomePage.class, "header.css"))); response.render(_javascript_HeaderItem.forReference(new _javascript_ResourceReference(HomePage.class, "page.js"))); package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Refactorings HttpsMapper has been refactored to make subclassing easier Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Igor Vaynberg Changes (1) ... | org.apache.wicket.behavior.SimpleAttributeModifier | org.apache.wicket.AttributeModifier#replace(...) | | org.apache.wicket.request.Url#toAbsoluteString() | org.apache.wicket.request.Url#toString(StringMode.FULL) | h3. Refactorings * HttpsMapper has been refactored to make subclassing easier Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read Wicket Ajax package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Refactorings HttpsMapper has been refactored to make subclassing easier Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Comment: Add an entry for the usage of JQuery Changes (1) ... * Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors h3. Ajax h4. Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read ... h3. List of renamed classes and methods ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read ... List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Martin Grigorov Changes (1) ... For more information read https://cwiki.apache.org/confluence/x/NK2oAQ h3. package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See [WICKET-4211|https://issues.apache.org/jira/browse/WICKET-4211] h3. List of renamed classes and methods ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters `IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175). Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors Ajax Use JQuery as a backing library for Wicket Ajax functionality Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read https://cwiki.apache.org/confluence/x/NK2oAQ package.properties renamed to wicket-package.properties The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Peter Ertl Changes (2) ... * Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors ... more to come ... h3. List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Heres a table of deprecated classes andnbsp;methods in Wicket 1.5 and the corresponding replacement in Wicket 6. || Wicket 1.5 (deprecated) || Wicket 6 (replacement) || | org.apache.wicket.behavior.SimpleAttributeModifier | org.apache.wicket.AttributeModifier#replace(...) | | org.apache.wicket.request.Url#toAbsoluteString() | org.apache.wicket.request.Url#toString(StringMode.FULL) | Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Igor Vaynberg Changes (1) ... * `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag * `AbstractValidator` has been removed * `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier * Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page moved by Sven Meier From: Apache Wicket Index To: Apache Wicket Migrations Children moved Change Notification Preferences View Online | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Igor Vaynberg Changes (1) ... * Wicket 6.0 requires at least Java 6 h3. Repeaters * IDataProvider was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages. h3. Form Processing ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Repeaters IDataProvider was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages. Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed `ValidationError` now makes creating standard error keys (classname and classname.subtype) easier Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors List of renamed classes and methods Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6. Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6. Wicket 1.5 (deprecated) Wicket 6 (replacement) org.apache.wicket.behavior.SimpleAttributeModifier org.apache.wicket.AttributeModifier#replace(...) org.apache.wicket.request.Url#toAbsoluteString() org.apache.wicket.request.Url#toString(StringMode.FULL) Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Sven Meier Changes (2) h1. Migrating to Wicket 1.6 6.0 h3. Environment * Wicket 1.6 6.0 requires at least Java 6 ... more to come ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 ... more to come ... Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Wicket Migration to Wicket 6.0
Migration to Wicket 6.0 Page edited by Igor Vaynberg Changes (1) ... * Wicket 6.0 requires at least Java 6 h3. Form Processing h4. Validation * `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead * `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead * `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag * `AbstractValidator` has been removed * Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors ... more to come ... Full Content Migrating to Wicket 6.0 Environment Wicket 6.0 requires at least Java 6 Form Processing Validation `DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead `StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead `StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag `AbstractValidator` has been removed Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors ... more to come ... Change Notification Preferences View Online | View Changes | Add Comment