I would also go for the submitOnEvent component since it seems
to offer the most flexible and still easy to use solution.

also +1 for not using Dojo. there are already enough components
dpending on Dojo.

On 10/9/06, Grant Smith <[EMAIL PROTECTED]> wrote:


On 10/9/06, Mario Ivankovits <[EMAIL PROTECTED]> wrote:
> Hi Bruno!
> > and would something like submitOnKeyPress (including enter) be more
> > general and with broader possibilities?
> Do you think about something which allows to configure which keyPress
> triggers the submit?
> How can such a configuration look like?
>
> 1) triggerKeys
> <s:submitOnKeyPress triggerKeys="#13,A,B,C" />
>
> Where #xx means 'keycode'.
>
>
> 2) triggerCallback
> <s:submitOnKeyPress triggerCallback="anyUserMethod" />
>
> Where anyUserMethod will be a user defined javascript function which has
> to be provided by the user
>
> I'd vote for method 2 as this is less complicated to code.
>
>
> To further "complicate" ;-) things we could also discuss if we further
> abstract the event - something like:
>
> <s:submitOnEvent event="keypress|change|focus|blur" />


I think this component would definitely be worth while. +1 !

> Where the default event is "keypress" and for "triggerCallback" the
> default is a method which will trigger on "Enter"
>
>
> Ciao,
> Mario
>
>



--
Grant Smith

Reply via email to