You want to change the return type to the type of your subclass of
WebApplication / WebSession.
i.e. this will work in JDK 1.5 with WebPage.getApplocation() made non final
class MyAppWebPage extends WebPage {
public MyAppWebApplication getApplication() {
return (MyAppWebApplication)super.getApplication();
}
}
i.e. to support < 1.5, without WebPage.getApplocation() made non final -
which I think is still a good idea.
class MyAppWebPage extends WebPage {
public MyAppWebApplication getApplication() {
return (MyAppWebApplication)super.getWicketApplication();
}
}
Cameron.
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:wicket-develop-
> [EMAIL PROTECTED] On Behalf Of Gili
> Sent: Wednesday, 17 August 2005 3:32 PM
> To: [email protected]
> Subject: Re: [Wicket-develop] Renaming getApplication() and getSession()
>
>
> I don't understand, what do you want to change the return type to?
> If
> it's a subclass of Application (as I expect) then you're fine. And if
> you use JDK 1.5 (as Cameron mentioned) you could use co-varient return
> types to refine the return type.
>
> Gili
>
> Igor Vaynberg wrote:
> > Making them nonfinal wont solve the problem since you have to keep the
> same
> > function signature.
> > -Igor
> >
> >
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] On Behalf Of Gili
> >>Sent: Tuesday, August 16, 2005 10:23 PM
> >>To: [email protected]
> >>Subject: Re: [Wicket-develop] Renaming getApplication() and
> >>getSession()
> >>
> >>
> >> Sorry, but -1. I'd much rather make these methods
> >>non-final instead.
> >>Wouldn't you prefer that as well?
> >>
> >>Gili
> >>
> >>Igor Vaynberg wrote:
> >>
> >>>What do you guys think of renaming all the getApplication() and
> >>>getSession() methods to getWicketApplication() and
> >>
> >>getWicketSession().
> >>
> >>>I am really sick of introducing get<SHORT_APP_NAME>Application() and
> >>>get<SHORT_APP_NAME>Session() everywhere because afore mentioned are
> >>>already taken and final! Makes my code look way more verbose. Seems
> >>>like a good time to do it since we are breaking some things
> >>
> >>in this release anyways.
> >>
> >>>-Igor
> >>>
> >>>
> >>>
> >>>
> >>>-------------------------------------------------------
> >>>SF.Net email is Sponsored by the Better Software Conference & EXPO
> >>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> >>>Practices Agile & Plan-Driven Development * Managing
> >>
> >>Projects & Teams
> >>
> >>>* Testing & QA Security * Process Improvement & Measurement *
> >>>http://www.sqe.com/bsce5sf
> >>>_______________________________________________
> >>>Wicket-develop mailing list
> >>>[email protected]
> >>>https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>
> >>
> >>--
> >>http://www.desktopbeautifier.com/
> >>
> >>
> >>-------------------------------------------------------
> >>SF.Net email is Sponsored by the Better Software Conference & EXPO
> >>September 19-22, 2005 * San Francisco, CA * Development
> >>Lifecycle Practices
> >>Agile & Plan-Driven Development * Managing Projects & Teams *
> >>Testing & QA
> >>Security * Process Improvement & Measurement *
> >>http://www.sqe.com/bsce5sf
> >>_______________________________________________
> >>Wicket-develop mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>
> >>
> >>
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
> QA
> > Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Wicket-develop mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
> --
> http://www.desktopbeautifier.com/
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Wicket-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop