Yes, that fixed it. i had the setResponsePage() call inside of onSubmit()
in:
form = new StatelessForm("form")
and I changed it to
form = new StatelessForm<Void>("form")
The question is why? I'm not sure I understand why that fixed it. How does
this definition:
public final <C extends Page<?>> void setResponsePage(final
Class<C> c, PageParameters p)
have any bearing on how the caller is defined? This may be a part of
generics I don't fully understand. If the calling object is a Form (which
does not subclass from Page), how does that impact this call?
An explanation would be helpful if you can elaborate.
Thanks,
-Doug
igor.vaynberg wrote:
>
> im guessing its not the Search page causing the error, but the
> component you are calling setResponsePage from.
>
> -igor
>
> On Sat, May 31, 2008 at 4:59 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote:
>>
>> I have a page:
>>
>> public class Search extends BasePage<Void>
>>
>> when I do this:
>>
>> setResponsePage(Search.class, p);
>>
>> I get an "Unchecked call to setResponsePage(Class<C>, PageParamters)
>> as a
>> member of raw type 'org.apache.wicket.Component'"
>>
>> Is this the new intended behavior (that I have to supress a warning each
>> time I call setResponsePage())?
>>
>> It isn't at all clear to me why this is better than simply defining the
>> class param as Class<?> as I suggested in the wiki page on this topic.
>>
>> I understand the old way of Class<? extends Page<?>> was correct
>> but
>> sometimes led to ugly casting. I didn't mind that way.
>>
>> -Doug
>> --
>> View this message in context:
>> http://www.nabble.com/Another-generics-question-from-1.4-trunk-tp17580897p17580897.html
>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Another-generics-question-from-1.4-trunk-tp17580897p17584913.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.