Hi Ernesto, Thanks for raising this! And for reviewing what we do ! :-)
I think it will be better to update InMethod Grid to the new Tree impl. I will try to do it at some point. If I don't succeed for some reason I may copy the old Tree code from Wicket 6.x to InMethod On Fri, May 24, 2013 at 10:44 AM, Ernesto Reinaldo Barreiro < [email protected]> wrote: > Martin, > > Mind that old tree is used as base for inMethod tree grid. So, either > > 1-classes might need to be moved there. > 2-or rewrite inMethod grid based on new grid implementation. > > Cheers, > > Ernesto > > > > On Fri, May 24, 2013 at 11:35 AM, <[email protected]> wrote: > > > Migration to Wicket 7.0< > https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0> > Page > > *edited* by Martin Grigorov< > https://cwiki.apache.org/confluence/display/~mgrigorov> > > Changes (2) > > ... > > {code} > > > > h3. Deprecated classes/methods/fields are removed > > > > h5. AbstractDefaultAjaxBehavior's #getSuccessHandler(), > > #getFailureHandler(), #getChannel() and #getPrecondition() are removed. > > They were deprecated since 6.0.0 and were there only for backward > > compatibility. Use #updateAjaxAttributes() to configure the same > > functionalities. > > > > h5. The old Tree component in wicket-extensions is removed. > > It was based on Swing APIs and many people complained about this. Use the > > new Tree component introduced in Wicket 6.0.0 instead. > > > > > > h3. Dependency updates > > > > ... > > Full Content > > Migrating to Wicket 7.0 > > > > - Environment< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-Environment> > > - Wicket 7.0 requires at least Java 7< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-Wicket7.0requiresatleastJava7 > > > > - Wicket 7.0 requires Servlet 3.0< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-Wicket7.0requiresServlet3.0 > > > > - The HTTP response is not flushed automatically when the > > request is started in asynchronous mode. WICKET-5152< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-TheHTTPresponseisnotflushedautomaticallywhentherequestisstartedinasynchronousmode.WICKET5152https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5152 > > > > - API changes< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-APIchanges> > > - org/apache/wicket/core/util/io/SerializableChecker is replaced > > with > org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream > > WICKET-4817< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org%2Fapache%2Fwicket%2Fcore%2Futil%2Fio%2FSerializableCheckerisreplacedwithorg.apache.wicket.core.util.objects.checker.CheckingObjectOutputStreamWICKET4817https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET4817 > > > > - org/apache/wicket/markup/html/border/BoxBorder is removed with > > no replacement WICKET-4966.< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org%2Fapache%2Fwicket%2Fmarkup%2Fhtml%2Fborder%2FBoxBorderisremovedwithnoreplacementWICKET4966https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET4966 > .> > > - org.apache.wicket.Component#renderHead(HtmlHeaderContainer) is > > renamed to Component#internalRenderHead(HtmlHeaderContainer) > WICKET-4964< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.Component%23renderHead%28HtmlHeaderContainer%29isrenamedtoComponent%23internalRenderHead%28HtmlHeaderContainer%29WICKET4964https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET4964 > > > > - > org.apache.wicket.request.resource.ResourceReference#getDependencies() > > now returns a mutable List<HeaderItem> WICKET-5124< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.request.resource.ResourceReference%23getDependencies%28%29nowreturnsamutableList%3CHeaderItem%3EWICKET5124https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5124 > > > > - org.apache.wicket.model.StringResourceModel constructor > > accepts IModel<String> for its default value WICKET-4972< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.model.StringResourceModelconstructoracceptsIModel%3CString%3EforitsdefaultvalueWICKET4972https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET4972 > > > > - > org.apache.wicket.extensions.validation.validator.+Xyz+Validator#decorate() > > now works with *IValidationError* WICKET-5174< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.extensions.validation.validator.XyzValidator%23decorate%28%29nowworkswithIValidationErrorWICKET5174https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5174 > > > > - > org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setAllowDefault > > is renamed to #setPreventDefault WICKET-5197< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.ajax.attributes.AjaxRequestAttributes%23setAllowDefaultisrenamedto%23setPreventDefaultWICKET5197https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5197 > > > > - > org.apache.wicket.ajax.attributes.AjaxRequestAttributes#eventPropagation > > is now BUBBLE by default WICKET-5198< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.ajax.attributes.AjaxRequestAttributes%23eventPropagationisnowBUBBLEbydefaultWICKET5198https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5198 > > > > - org.apache.wicket.ajax.form.AjaxFormValidatingBehavior doesn't > > use static methods anymore WICKET-5196< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.ajax.form.AjaxFormValidatingBehaviordoesn%27tusestaticmethodsanymoreWICKET5196https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5196 > > > > - Behavior changes< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-Behaviorchanges> > > - org.apache.wicket.request.Url#getQueryString WICKET-4664< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.request.Url%23getQueryStringWICKET4664https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET4664 > > > > - org.apache.wicket.request.http.WebResponse encodes the value > > of the "filename" in Content-Disposition header WICKET-4934< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.request.http.WebResponseencodesthevalueofthe%22filename%22inContentDispositionheaderWICKET4934https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET4934 > > > > - org.apache.wicket.markup.html.form.FormComponentLabel outputs > > "required", "disabled" and "error" classes when its form > component is > > either required, disabled or invalid. WICKET-5177< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.markup.html.form.FormComponentLabeloutputs%22required%22%2C%22disabled%22and%22error%22classeswhenitsformcomponentiseitherrequired%2Cdisabledorinvalid.WICKET5177https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5177 > > > > - org.apache.wicket.markup.html.panel.FeedbackPanel Do not set > > CSS class on the li > span element for a feedback message > WICKET-4831< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-org.apache.wicket.markup.html.panel.FeedbackPanelDonotsetCSSclassontheli%3EspanelementforafeedbackmessageWICKET4831https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET4831 > > > > - AjaxEventBehavior doesn't prevent the default behavior of the > > JavaScript event WICKET-5197< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-AjaxEventBehaviordoesn%27tpreventthedefaultbehavioroftheJavaScripteventWICKET5197https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5197 > > > > - Ajax behaviors let JavaScript events bubble by default > > WICKET-5198< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-AjaxbehaviorsletJavaScripteventsbubblebydefaultWICKET5198https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWICKET5198 > > > > - Deprecated classes/methods/fields are removed< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-Deprecatedclasses%2Fmethods%2Ffieldsareremoved > > > > - AbstractDefaultAjaxBehavior's #getSuccessHandler(), > > #getFailureHandler(), #getChannel() and #getPrecondition() are > removed.< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-AbstractDefaultAjaxBehavior%27s%23getSuccessHandler%28%29%2C%23getFailureHandler%28%29%2C%23getChannel%28%29and%23getPrecondition%28%29areremoved > .> > > - The old Tree component in wicket-extensions is removed.< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-TheoldTreecomponentinwicketextensionsisremoved > .> > > - Dependency updates< > https://cwiki.apache.org/confluence#MigrationtoWicket7.0-Dependencyupdates > > > > > > Environment Wicket 7.0 requires at least Java 7 Wicket 7.0 requires > > Servlet 3.0 The HTTP response is not flushed automatically when the > > request is started in asynchronous mode. WICKET-5152< > https://issues.apache.org/jira/browse/WICKET-5152> > > > > This is an improvement in Wicket 7.0 which should not affect any > > application migrating from Wicket 6.x. But if you use Servlet 3.0's > > AsyncContext in IResource in Wicket 7 then make sure that your code > flushes > > the http response after completing the request. > > API changes org/apache/wicket/core/util/io/SerializableChecker is > > replaced with > > org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream > > WICKET-4817 <https://issues.apache.org/jira/browse/WICKET-4817> > > > > CheckingObjectOutputStream accepts a list of > > org.apache.wicket.core.util.objects.checker.IObjectChecker objects which > > are used to check for different kind of problems during object > > serialization. Commit diff: d0441059e0< > https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=d0441059e0bba325f3f68a5db00282cc3901dc5a > > > > org/apache/wicket/markup/html/border/BoxBorder is removed with no > > replacement WICKET-4966< > https://issues.apache.org/jira/browse/WICKET-4966> > > . > > > > BoxBorder class has been deprecated in Wicket 6.x series > > org.apache.wicket.Component#renderHead(HtmlHeaderContainer) is renamed to > > Component#internalRenderHead(HtmlHeaderContainer) WICKET-4964< > https://issues.apache.org/jira/browse/WICKET-4964> > > > > Component#renderHead(HtmlHeaderContainer) was very similar to the usually > > used Component#renderHead(IHeaderResponse). So it has been renamed to > avoid > > any confusions. > > org.apache.wicket.request.resource.ResourceReference#getDependencies() > now > > returns a mutable List<HeaderItem> WICKET-5124< > https://issues.apache.org/jira/browse/WICKET-5124> > > > > The old API returned Iterable<? extends HeaderItem> and was inconvenient > > to override and add additional dependencies. > > With the new API it is as easy as: > > *MyResourceReference.java* > > > > @Overridepublic List<HeaderItem> getDependencies() { > > List<HeaderItem> dependencies = super.getDependencies(); > > dependencies.add(dep1); > > dependencies.add(dep2); > > return dependencies; > > } > > > > The same is done for > > org.apache.wicket.markup.head.HeaderItem#getDependencies() too. > > org.apache.wicket.model.StringResourceModel constructor accepts > > IModel<String> for its default value WICKET-4972< > https://issues.apache.org/jira/browse/WICKET-4972> > > > > There were two problems with the old way: > > > > - since the *parameters* argument type is Object..., i.e. varargs, it > > was hard for the compiler and runtime to differentiate the > "defaultValue" > > from the "parameters" > > - it wasn't possible to use lazy evaluation of the default value > > > > If in your application you have code like: > > *MyComponent.java* > > > > StringResourceModel model = new StringResourceModel(resourceKey, model, > "Some default value", new Object[] [param1, param2]); > > > > then the simplest solution is to use *Model.of("Some default value")*: > > *MyComponent.java* > > > > StringResourceModel model = new StringResourceModel(resourceKey, model, > Model.of("Some default value"), new Object[] [param1, param2]); > > > > > org.apache.wicket.extensions.validation.validator.+Xyz+Validator#decorate() > > now works with *IValidationError* WICKET-5174< > https://issues.apache.org/jira/browse/WICKET-5174> > > > > This method now accepts IValidationError as an argument and returns > > IValidationError. This way it can be used with other IValidationError > > implementations like RawValidationError for example. > > org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setAllowDefault > is > > renamed to #setPreventDefault WICKET-5197< > https://issues.apache.org/jira/browse/WICKET-5197> > > > > This is done to make it more consistent with JavaScript API. > > org.apache.wicket.ajax.attributes.AjaxRequestAttributes#eventPropagation > > is now BUBBLE by default WICKET-5198< > https://issues.apache.org/jira/browse/WICKET-5198> > > > > This is done to make it more consistent with JavaScript API. > > org.apache.wicket.ajax.form.AjaxFormValidatingBehavior doesn't use static > > methods anymore WICKET-5196< > https://issues.apache.org/jira/browse/WICKET-5196> > > > > To use AjaxFormValidatingBehavior in Wicket 6.x the application code > > should do something like: > > *MyComponent.java* > > > > AjaxFormValidatingBehavior.addToAllFormComponents(form, "keydown", > Duration.ONE_SECOND); > > > > Due to the usage of static method it wasn't possible to extend this > > behavior and override for example > > #updateAjaxAttributes(AjaxRequestAttributes). > > > > The behavior has been reworked a bit to allow this. The new usage is: > > *MyComponent.java* > > > > form.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND); > > > > or > > *MyComponent.java* > > > > formComponent.add(new AjaxFormValidatingBehavior("keydown", > Duration.ONE_SECOND); > > > > in this case the formComponent's owning Form will be used. > > Behavior changes org.apache.wicket.request.Url#getQueryString > WICKET-4664<https://issues.apache.org/jira/browse/WICKET-4664> > > > > Url#getQueryString() now behaves as HttpServletRequest behaves : > > > > - returns the query string without the leading "?" > > - returns null when there is no query string > > > > RequestUtils#decodeParameters() now strips the "?" from the output value. > > org.apache.wicket.request.http.WebResponse encodes the value of the > > "filename" in Content-Disposition header WICKET-4934< > https://issues.apache.org/jira/browse/WICKET-4934> > > > > The value of the file name used in "Content-Disposition" response header > > can contain characters which should be encoded< > http://greenbytes.de/tech/tc2231/> > > org.apache.wicket.markup.html.form.FormComponentLabel outputs "required", > > "disabled" and "error" classes when its form component is either > required, > > disabled or invalid. WICKET-5177< > https://issues.apache.org/jira/browse/WICKET-5177> > > > > This way it is in sync with AutoLabel (the auto component that is used > for > > "wicket:for" attribute). > > org.apache.wicket.markup.html.panel.FeedbackPanel Do not set CSS class on > > the li > span element for a feedback message WICKET-4831< > https://issues.apache.org/jira/browse/WICKET-4831> > > > > The css class is now only applied to the li element and not to the span > > inside. Additionally a FeedbackPanel#newMessageItem() method has been > added > > to allow customization of each feedback message item (similar to > > DataTable#newRowItem()). > > AjaxEventBehavior doesn't prevent the default behavior of the JavaScript > > event WICKET-5197 <https://issues.apache.org/jira/browse/WICKET-5197> > > > > From now on only AjaxFallback** components prevent the default JavaScript > > event behavior so only the Ajax call is made when JavaScript is enabled > in > > the browser. > > If the default behavior should be prevented in any use case then use: > > > > attributes.setPreventDefault(true); > > > > Ajax behaviors let JavaScript events bubble by default WICKET-5198< > https://issues.apache.org/jira/browse/WICKET-5198> > > > > If JavaScript events should not bubble then use: > > > > attributes.setEventPropagation(EventPropagation.STOP); > > > > or: > > > > attributes.setEventPropagation(EventPropagation.STOP_IMMEDIATE); > > > > Deprecated classes/methods/fields are removed > AbstractDefaultAjaxBehavior's > > #getSuccessHandler(), #getFailureHandler(), #getChannel() and > > #getPrecondition() are removed. > > > > They were deprecated since 6.0.0 and were there only for backward > > compatibility. Use #updateAjaxAttributes() to configure the same > > functionalities. > > The old Tree component in wicket-extensions is removed. > > > > It was based on Swing APIs and many people complained about this. Use the > > new Tree component introduced in Wicket 6.0.0 instead. > > Dependency updates > > > > All libraries on which Wicket modules depend are updated to their latest > > stable versions. > > The most notable ones are: > > > > - Spring Framework 3.2.2 > > - ASM 4.1 > > - CGLIB 3.0 > > - SLF4J 1.7.5 > > - Jetty (in the quickstart) 8.1.10 > > > > Change Notification Preferences< > https://cwiki.apache.org/confluence/users/viewnotifications.action> > > View Online< > https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0>| > View > > Changes< > https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=31819945&revisedVersion=21&originalVersion=20>| > Add > > Comment< > https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0?showComments=true&showCommentArea=true#addcomment > > > > > > > > -- > Regards - Ernesto Reinaldo Barreiro >
