On Mon, Jun 2, 2008 at 10:21 AM, richardwilko
<[EMAIL PROTECTED]> wrote:
>
> ok maybe i misread this :
>
> 'Can best be done in a limited fashion, where we only generify
> IModel but not components. I care more about what generifying can do
> for API clarity (declaring a component to only accept certain models
> for instance) than static type checking.'
>
> but those 2 sentences seem to contradict each other, the first says only
> generify IModel which I assumed ti mean that when you put a String into a
> model you would get a String out of it, the second seems to says
> generifiying components to make them only accept some model types.
>
> So just to clarify my position
>
> generic models which would do away with this type of casting:
> protected void onSubmit(AjaxRequestTarget target, Form form)
> {
>        EmailFormModel emailFormModel = (EmailFormModel) form.getModelObject();
>        ....
> is what I would like to see.
>
> generic components im not bothered about.
>

Using generics will do away with the casting, but only if you
genericize Component.  Merely genericizing IModel won't get rid of the
casting by itself.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to