Your right, my patch was a bit off with respect to Palette, but not because of this. I shouldn't have "widened" the second constructor. It should take a IModel<List<T>>. So, the getModelCollection() doesn't have to change. When we're doing this widening, only the "choices" (not the model) should be widened.
On Fri, Mar 13, 2009 at 3:31 AM, Igor Vaynberg <[email protected]> wrote: > your patch works because it does not properly refactor > Palette#getModelCollection(). you left it us: > > public Collection<T> getModelCollection() > { > return (Collection<T>)getDefaultModelObject(); > } > > which is incorrect, it should in fact now return Collection<? extends > T>, which will break Palette#updateModel() > > -igor > > On Thu, Mar 12, 2009 at 11:32 PM, James Carman > <[email protected]> wrote: >> FYI, >> >> I have created a new JIRA issue for my proposed API changes: >> >> https://issues.apache.org/jira/browse/WICKET-2165 >> >> I've attached a patch. I've "fixed" all of the places I could find >> thus far. If I find anymore, I'll upload a new patch. >> >> James >> >> On Fri, Mar 13, 2009 at 1:59 AM, James Carman >> <[email protected]> wrote: >>> "Feeding" the list to your component isn't the issue (the constructor >>> will take what you throw at it). It's using the >>> getDefaultModelObject() method and trying to modify that list once >>> you've passed it in that will cause you to have to cast. >>> >>> On Fri, Mar 13, 2009 at 1:54 AM, Brill Pappin <[email protected]> wrote: >>>> I'm really not sure of all the use-cases... all I know is that I spent some >>>> time trying to get the darn thing to compile using a fairly basic wicket >>>> pattern. >>>> >>>> If such a simple thing as feeding a list of items to a component that draws >>>> a list using them is going to give me that much trouble (knowing a >>>> workaround or not), then there is something definitely broken. >>>> >>>> - Brill >>>> >>>> On 13-Mar-09, at 1:43 AM, James Carman wrote: >>>> >>>>> To be clear, the only potential for breakage is where user code tries >>>>> to modify the returned "model object" (of type List<? extends T>) >>>>> without casting it. However, that's a rare usecase (in my opinion) >>>>> and again it's easily overcome by a simple cast. >>>>> >>>>> On Thu, Mar 12, 2009 at 5:10 PM, Igor Vaynberg <[email protected]> >>>>> wrote: >>>>>> >>>>>> before applying an api-breaking patch to an rc release we should have >>>>>> a vote on the dev list. >>>>>> >>>>>> -igor >>>>>> >>>>>> On Thu, Mar 12, 2009 at 12:59 PM, Jeremy Thomerson >>>>>> <[email protected]> wrote: >>>>>>> >>>>>>> Unless I'm seeing double - this patch has two problems: >>>>>>> >>>>>>> 1 - It is the opposite of what was voted on. The vote was to make >>>>>>> IModel<List<? extends E>> into IModel<List<E>>. Your patch makes it >>>>>>> IModel<? extends List<? extends E>>. >>>>>>> >>>>>>> 2 - The patch causes compile errors that were not fixed. >>>>>>> >>>>>>> I have unassigned myself from the task until those issues are addressed >>>>>>> or I >>>>>>> have time to create my own patch. The best solution would be for >>>>>>> someone to >>>>>>> submit a proper patch that fixes the two problems above or explain to me >>>>>>> what I missed. >>>>>>> >>>>>>> Thanks! >>>>>>> >>>>>>> -- >>>>>>> Jeremy Thomerson >>>>>>> http://www.wickettraining.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Thu, Mar 12, 2009 at 2:53 PM, Jeremy Thomerson >>>>>>> <[email protected] >>>>>>>> >>>>>>>> wrote: >>>>>>> >>>>>>>> I'm reviewing it now. Assuming that it looks fine, and is line with >>>>>>>> what >>>>>>>> was proposed by the vote thread earlier, I will apply. The vote >>>>>>>> passed, so >>>>>>>> I don't see a reason not to. I'm not sure how many were binding / >>>>>>>> non-binding, but there were eight for, two against. >>>>>>>> >>>>>>>> -- >>>>>>>> Jeremy Thomerson >>>>>>>> http://www.wickettraining.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Thu, Mar 12, 2009 at 9:52 AM, Brill Pappin <[email protected]> wrote: >>>>>>>> >>>>>>>>> https://issues.apache.org/jira/browse/WICKET-2137 >>>>>>>>> >>>>>>>>> - Brill >>>>>>>>> >>>>>>>>> --------------------------------------------------------------------- >>>>>>>>> To unsubscribe, e-mail: [email protected] >>>>>>>>> For additional commands, e-mail: [email protected] >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: [email protected] >>>>>> For additional commands, e-mail: [email protected] >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
