a4j:support 事件属性中可以有多个值吗?
<a:support event="onchange, onsubmit" ajaxSingle="true"
action="#{customerSession.userCheckQuantity(_cartItem, index)}"
reRender="shoppingCartAjax, orderTotalAjax"></a:support>
最佳答案
不,你不能。在TLD对于 event
属性,它说:
Name of JavaScript event property ( onclick, onchange, etc.) of parent component, for which we will build AJAX submission code
有一个JIRA请求此功能,但它仍处于打开状态。由于它适用于 RF3,我猜这不会改变。
但是有another request a4j:ajax
(在 RF4 中等效)支持同样的事情。由于它适用于 RF4,我猜它更有可能得到实现。
作为替代方案,您可以为一个组件使用多个 a4j:support
标签:
<h:selectOneMenu id="planets" value="#{planetsMoons.currentPlanet}" valueChangeListener="#{planetsMoons.planetChanged}">
<f:selectItems value="#{planetsMoons.planetsList}" />
<a4j:support event="onchange" reRender="id1,id2" />
<a4j:support event="onkeyup" reRender="id1,id3" />
</h:selectOneMenu>
关于richfaces - 可以a4j :support have more than one value in the event attribute?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6875480/