我使用的是JSF 1.2,Seam 2.2.2和Richfaces 3.3.3。我有一个a4j:支持事件,当有人在链接上盘旋时被调用。但是这个函数只在页面加载后被调用一次。如果我再次在链接上鼠标悬停,则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>
答案 0 :(得分:2)
像这样修改输出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中