You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Sebastien <se...@gmail.com> on 2013/12/14 17:39:13 UTC

Wicket 7 - Migration

Hi dev team,

I've upgraded wicket-jquery-ui to wicket-7 and it was pretty
straightforward, thanks for your work and thanks to the migration guide [1]
! :)

I've just have some minor comments:
- There is no explicit mention of the type attribute to be used with
DatePicker (type=date, instead of type=text). This leads to a runtime
exception. Maybe just an update of the paragraph talking about
TextField#getInputType() will be enough.
- There is no mention of the ctor signature change of the Palette component
- "IPageLink has been scheduled for removal" whereas it seems to have
already been removed...

Thanks again & best regards,
Sebastien.

[1]
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0

Re: Wicket 7 - Migration

Posted by Sebastien <se...@gmail.com>.
In addition, I just realized there is a mismatch in the Palette ctors,
about choicesModel:

ctor #1
final IModel<? extends Collection<T>> choicesModel

ctor #2:
final IModel<? extends Collection<? extends T>> choicesModel

I guess the ctor #2 is the right one (which is the original one), due to
type of choicesModel member and the #getChoices signature.

If I have time, I will investigate a little bit further on the Palette
component because it seems to have a weird behavior... (getting wrong model
object, list of available choices emptied after submit... maybe a misuse or
might be related to the usage of a simple ChoiceRenderer like new
ChoiceRenderer<String>() or new ChoiceRenderer<Integer>()). I do not say
it's a wicket 7 specific issue, I do not remember having ever used the
palette actually...

Best regards,
Sebastien.


On Mon, Dec 16, 2013 at 10:50 PM, Sebastien <se...@gmail.com> wrote:

> Hi Martin,
>
> On Mon, Dec 16, 2013 at 3:02 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> Hi Sebastien,
>>
>> Can you please provide more details about the issues  ?
>>
>> - I see no restrictions in DatePicker.java about the <input>'s type
>> attribute
>>
>
> Sorry, I meant the DateTextField:
>
>     protected String[] getInputTypes()
>     {
>         return new String[] { "date", "datetime", "datetime-local",
> "month", "time", "week" };
>     }
>
> So, this is no allowed anymore to have a markup with input type="text"
> whereas it was legal in wicket 6
>
>
>>
>> - I see that with 6f0f633 the constructor of Pallete now accepts:
>> IModel<? extends Collection<T>> model
>>
>> instead of
>>
>> IModel<? extends List<? extends T>> model
>>
>>
> Right, this could leads to a compilation error. User will likely replace
> Model.ofList(myList) to new ListModel<String>(myList) or new
> CollectionModel<String>(myList)
>  Or for jewelers: new ListModel<>(myList) or new CollectionModel<>(myList)
>
>
>> - There was a discussion to deprecate IPageLink long time ago but for some
>> reason we missed to mark it as such
>> I'll deprecate it in 6.x and fix the migration guide
>>
>>
> Thanks :)
>
> Best regards,
> Sebastien.
>

Re: Wicket 7 - Migration

Posted by Martin Grigorov <mg...@apache.org>.
On Mon, Dec 16, 2013 at 11:50 PM, Sebastien <se...@gmail.com> wrote:

> Hi Martin,
>
> On Mon, Dec 16, 2013 at 3:02 PM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
>
> > Hi Sebastien,
> >
> > Can you please provide more details about the issues  ?
> >
> > - I see no restrictions in DatePicker.java about the <input>'s type
> > attribute
> >
>
> Sorry, I meant the DateTextField:
>
>     protected String[] getInputTypes()
>     {
>         return new String[] { "date", "datetime", "datetime-local",
> "month", "time", "week" };
>     }
>
> So, this is no allowed anymore to have a markup with input type="text"
> whereas it was legal in wicket 6
>

This was a regression.
I've added back "text" type as allowed.


>
>
> >
> > - I see that with 6f0f633 the constructor of Pallete now accepts:
> > IModel<? extends Collection<T>> model
> >
> > instead of
> >
> > IModel<? extends List<? extends T>> model
> >
> >
> Right, this could leads to a compilation error. User will likely replace
> Model.ofList(myList) to new ListModel<String>(myList) or new
> CollectionModel<String>(myList)
> Or for jewelers: new ListModel<>(myList) or new CollectionModel<>(myList)
>
>
@Sven: would you please check this ?
It has been changed with https://issues.apache.org/jira/browse/WICKET-5352
Thanks!


>
> > - There was a discussion to deprecate IPageLink long time ago but for
> some
> > reason we missed to mark it as such
> > I'll deprecate it in 6.x and fix the migration guide
> >
> >
> Thanks :)
>
> Best regards,
> Sebastien.
>

Re: Wicket 7 - Migration

Posted by Sebastien <se...@gmail.com>.
Hi Martin,

On Mon, Dec 16, 2013 at 3:02 PM, Martin Grigorov <mg...@apache.org>wrote:

> Hi Sebastien,
>
> Can you please provide more details about the issues  ?
>
> - I see no restrictions in DatePicker.java about the <input>'s type
> attribute
>

Sorry, I meant the DateTextField:

    protected String[] getInputTypes()
    {
        return new String[] { "date", "datetime", "datetime-local",
"month", "time", "week" };
    }

So, this is no allowed anymore to have a markup with input type="text"
whereas it was legal in wicket 6


>
> - I see that with 6f0f633 the constructor of Pallete now accepts:
> IModel<? extends Collection<T>> model
>
> instead of
>
> IModel<? extends List<? extends T>> model
>
>
Right, this could leads to a compilation error. User will likely replace
Model.ofList(myList) to new ListModel<String>(myList) or new
CollectionModel<String>(myList)
Or for jewelers: new ListModel<>(myList) or new CollectionModel<>(myList)


> - There was a discussion to deprecate IPageLink long time ago but for some
> reason we missed to mark it as such
> I'll deprecate it in 6.x and fix the migration guide
>
>
Thanks :)

Best regards,
Sebastien.

Re: Wicket 7 - Migration

Posted by Martin Grigorov <mg...@apache.org>.
Hi Sebastien,

Can you please provide more details about the issues  ?

- I see no restrictions in DatePicker.java about the <input>'s type
attribute

- I see that with 6f0f633 the constructor of Pallete now accepts:
IModel<? extends Collection<T>> model

instead of

IModel<? extends List<? extends T>> model

- There was a discussion to deprecate IPageLink long time ago but for some
reason we missed to mark it as such
I'll deprecate it in 6.x and fix the migration guide


Martin Grigorov
Wicket Training & Consulting


On Sat, Dec 14, 2013 at 6:39 PM, Sebastien <se...@gmail.com> wrote:

> Hi dev team,
>
> I've upgraded wicket-jquery-ui to wicket-7 and it was pretty
> straightforward, thanks for your work and thanks to the migration guide [1]
> ! :)
>
> I've just have some minor comments:
> - There is no explicit mention of the type attribute to be used with
> DatePicker (type=date, instead of type=text). This leads to a runtime
> exception. Maybe just an update of the paragraph talking about
> TextField#getInputType() will be enough.
> - There is no mention of the ctor signature change of the Palette component
> - "IPageLink has been scheduled for removal" whereas it seems to have
> already been removed...
>
> Thanks again & best regards,
> Sebastien.
>
> [1]
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0
>