Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Proposal for this new component:
A new component which aims to do whats described here [1]
Component name: submitOnEvent
It should operate in three modes:
1) as a child of an input* component (direct child)
In this mode submitOnEvent will add a event handler to the input
component and fires the button/link pointed to with "for"
2) standalone somewhere on the page
In this mode submitOnEvent will intercept all events it is configured for
and fires the button/link pointed to with "for"
3) as a child of a command* component (link or button)
In this mode submitOnEvent will intercept all events it is configured for
and fires the button/link it is embedded.
It should handle buttons and links - links as described on [2]
The proposed syntax is:
<s:submitOnEvent
for="myButton"
event="keypress|focus|blur|change"
callback="any_user_js_function" />
"event" and "callback" should be optional.
The default event should be "keypress" and for "callback" the default should be a method which will trigger on "Enter".
"for" should be optional if the component is embedded in a command* component.
<h:commandLink .... >
<s:submitOnEvent/>
</h:commandLink>
The component should not use dojo.
[1] http://wiki.apache.org/myfaces/SubmitPageOnValueChange
[2] http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces