Hi!

What do you think about a new component which aims to do whats described
here [1]

It should operate in three modes:

1) as a child of an input* component (direct child)
In this mode submitOnEnter will add a "onkeypress" handler to the input
component and fires the button/link pointed to with "for"

2) standalone somewhere on the page
In this mode submitOnEnter will intercept *all* keystrokes and fires the
button/link pointed to with "for"

3) as a child of a command* component (link or button)
In this mode submitOnEnter will intercept *all* keystrokes and fires the
button/link it is embedded.

It should handle buttons and links - links as described on [2]


The proposed syntax is:

<s:submitOnEnter for="myButton" />

<h:commandLink .... >
    <s:submitOnEnter/>
</h:commandLink>

Even if for some reasons it might be easier, the component should *not*
use dojo.


What do you think?

Ciao,
Mario


[1] http://wiki.apache.org/myfaces/SubmitPageOnValueChange
[2] http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces

Reply via email to