[jala-dev] Re: AW: Re: Further feedback on jala.Form

  • From: <tobias.schaefer@xxxxxx>
  • To: <jala-dev@xxxxxxxxxxxxx>
  • Date: Thu, 10 May 2007 15:24:07 +0200

Hi Stefan

> There is an objection: the name is the most important field of the
> component (used for fetching/storing values, for mapping the
> component at form.components, for handling the user input etc). I
> have a FIXME in my code because currently you are able to construct a
> component without a name and it shouldn't be like that. But the label
> is optional, doesn't exist for all components and can only be added
> once the object has been instantiated.      

Of course the name property *has* to be determined in any way and any case.

> So my proposal is that the constructor stays this way always
> requiring a name as argument. What we change is jala.Form.create: If
> this method comes across a config element with a label but without a
> name, it converts the label text to a name and uses it to construct
> the component. After all, it's a helper method.    

I was told that's exactly how the lazy programmer imagined it. 

(I guess he did not think of the constructor at all, anyway.)


Other related posts: