Thanks for testing 7.x and giving feedback !
On Mon, Feb 3, 2014 at 11:28 AM, Martijn Dashorst < [email protected]> wrote: > It dawned upon me that my usage of property column was flawed in the > application, so I modified my application to use AbstractColumn instead. > > Nevertheless the typing seamed flawed to me. Thanks for looking deeper into > it. > > Martijn > > > On Mon, Feb 3, 2014 at 10:44 AM, Martin Grigorov <[email protected] > >wrote: > > > As discussed in WICKET-4802 the third type parameter for > IExportableColumn > > is not really needed and has been removed. > > > > Martin Grigorov > > Wicket Training and Consulting > > > > > > On Sun, Feb 2, 2014 at 10:37 AM, Martin Grigorov <[email protected] > > >wrote: > > > > > The problem is that > > > public class PropertyColumn<T, S> extends AbstractColumn<T, S> > implements > > > IExportableColumn<T, S, *Object*> mandates that return type. > > > The only correct way to fix this is to add third type parameter to > > > PropertyColumn: PropertyColumn<T, S, *D*>. > > > This will lead to compile errors and will require every app to add the > > > third type in 7.x. > > > Related ticket is: https://issues.apache.org/jira/browse/WICKET-4802 > > > > > > Martin Grigorov > > > Wicket Training and Consulting > > > > > > > > > On Fri, Jan 31, 2014 at 2:48 PM, Martin Grigorov <[email protected] > > >wrote: > > > > > >> It looks like an error. > > >> > > >> > > >> On Fri, Jan 31, 2014 at 1:44 PM, Martijn Dashorst < > > >> [email protected]> wrote: > > >> > > >>> public class PropertyColumn<T, S> extends AbstractColumn<T, S> > > implements > > >>> IExportableColumn<T, S, Object> > > >>> { > > >>> ... > > >>> > > >>> /** > > >>> * Factory method for generating a model that will generated the > > >>> displayed > > >>> value. Typically the > > >>> * model is a property model using the {@link #propertyExpression} > > >>> specified in the constructor. > > >>> * > > >>> * @param rowModel > > >>> * @return model > > >>> */ > > >>> @Override > > >>> public IModel<Object> getDataModel(IModel<T> rowModel) > > >>> { > > >>> PropertyModel<Object> propertyModel = new PropertyModel<>(rowModel, > > >>> propertyExpression); > > >>> return propertyModel; > > >>> } > > >>> } > > >>> > > >>> > > >>> Should the return type getDataModel(IModel<T> rowModel) rather be > > >>> IModel<?> > > >>> ? It is now impossible to return Model.of("foo") for instance, as > > >>> Model<String> can't be cast to IModel<Object> > > >>> > > >>> Martijn > > >>> > > >> > > >> > > > > > > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com >
