Ajax Facelets 标记中“事件”的可能值是什么?
我正在考虑 Ajax Facelets 标记内“event”属性的可能值是什么。我正在使用 JSF 2.0,当我转到 Facelets documentation 时我找不到这个信息。
我只知道 keyup
和 keydown
值:
<f:ajax event="keyup"/>
<f:ajax event="keydown"/>
可在 facelets
标记内使用的值的完整列表是什么?
最佳答案
从您向我们提供的确切链接:
If specified, it must be one of the events supported by the component the Ajax behavior is being applied to. For HTML components this would be the set of supported DOM events for the component, plus "action" for Faces ActionSource components and "valueChange" for Faces EditableValueHolder components. If not specified, the default event is determined for the component. The DOM event name is the actual DOM event name (for example: "click") as opposed to (for example: "onclick").
除了这个你还需要什么?
另请参阅:
- ClientBehaviorHolder#getEventNames :定义 UIComponent 实现支持的事件。 HtmlInputText例如定义此事件列表,这意味着您可以
<f:ajax event
其中任何一个:
private static final Collection<String> EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur","change","valueChange","click","dblclick","focus","keydown","keypress","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","select"))
关于java - Ajax Facelets 支持的 "events"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19383102/