[英]a4j:support function getting called only once in h:commandLink
我使用的是 JSF 1.2、Seam 2.2.2 和 Richfaces 3.3.3。 我有一個 a4j:support 事件,當有人將鼠標懸停在鏈接上時會調用該事件。 但是這個函數在頁面加載后只被調用一次。 如果我再次將鼠標懸停在鏈接上,a4support 事件不會調用該函數。 任何人都知道可能是什么原因?
<s:div style="padding-top:10px;">
<rich:dataTable id="pendingOptyTbl" value="#{searchResultList}"
var="item" style="width: 100%; border: none;">
<rich:column style="border: none;">
<s:div>
<h:outputText value="#{item.label} : " />
<h:outputLink value="/aafdemo/pages/#{item.label}/#{item.label}.seam" styleClass="actionLink">
<h:outputText value="#{item.value.name}" />
<f:param name="#{item.label}Id" value="#{item.value.id}" />
<a4j:support event="onmouseover" immediate="true" action="#searchController.test()}" ajaxSingle="true" reRender="details"/>
</h:outputLink>
</s:div>
</rich:column>
</rich:dataTable>
像這樣修改你的輸出 div:
<h:panelGroup id="details"><s:div style="float:right;" rendered="#{resultObject!=null}"> <h:outputText value="details" /> <h:outputText value="#{resultObject.value.id}"/> </s:div></h:panelGroup>
元素需要始終渲染才能工作!
編輯:正如 Luiggi 提到的,bean resultObject 必須在 SessionScope 或 KeepAlive
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.