+1 on that too, except that I'd prefer the name GenericLink.

one problem though, suppose we have GenericWebMarkupContainer,
GenericPanel, GenericForm (maybe) etc, things like
findParent(Form.class) will no longer work, as it will have to be
findParent(GenericForm.class).

-Matej

On Sat, May 24, 2008 at 11:16 AM, John Patterson <[EMAIL PROTECTED]> wrote:
>
>
>
> Jonathan Locke wrote:
>>
>> Personally, I don't see this use of Void as something even remotely close
>> to a reason to scrap it. I would happily use that construct every day. But
>> that's just me.
>>
>
> I completely agree with this and have found that specifying Void actually
> makes me a lot more conscious about the roll of the model.  I find it
> invaluable to have Eclipse quickfix "assign to local variable" automatically
> with the correct type from getModelObject().  Would be a terrible shame to
> lose this.
>
> Scrapping it on a case by case basis seems to make the most sense.  Is Link
> one of these cases?  It is *normally* used without a model.  For such common
> cases it is easy to create a non-generic subclass.  What is the problem with
> that?
>
> Is it possible to use a generic base class for users that want to have a
> type safe model like:
>
> class Link extends LinkGeneric<Void>
> {
> }
>
> LinkGeneric<T>
> {
> }
>
> The generic base class could be used in core components.
>
> John
> --
> View this message in context: 
> http://www.nabble.com/%28Class%3C--extends-Page%3C-%3E%3E%29--casting-troubles-tp17355847p17446015.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to