[jala-dev] Re: AW: Code Convention in jalaForm.js

  • From: <robert.gaggl@xxxxxx>
  • To: <jala-dev@xxxxxxxxxxxxx>
  • Date: Wed, 16 May 2007 09:21:37 +0200

hi kris,

your suggestions all look very plausible to me, so i'm all +1 for them.

> Another issue that needs to be addressed in jalaForms is the 
> possibility to add handlers and additional attributes like 
> tabindex or accesskey to a component. Stefan suggested to add 
> an object called attributes in the form definition,
> e.g.
>    name: "author",
>    label: "Author:",
>    require: true
>    attributes: {
>       onClick:"alert(this);",
>       accesskey: "t"
>    }
> Whatever you write in this object will be added as and 
> attribute to the respective HTML tag.

in addition we'd need a get/setAttributes() pair in
jala.Form.Component.Input, which i'm also fine with.

> Finally, it would be nice if the cursor or the focus changes 
> to the component that has an error. This could be done in a 
> small client-side JS.

do you mean this client side script should be rendered by jala.Form? if
so, how could/should this look like?


Other related posts: