我有一個JSF 1.2命令鏈接如何獲得更新的用戶列表JSF刷新
<h:commandLink id="cars" action="${swapViewHandler.myFunction1}">
<h:commandLink id="ships" action="${swapViewHandler.myFunction2}">
myFunction1填充swapViewHandler.listA和汽車及導航到cars.xhtml
<navigation-rule>
<navigation-case>
<from-outcome>cars</from-outcome>
<to-view-id>cars.xhtml</to-view-id>
<redirect />
</navigation-case>
myFunction2填充與船舶和 相同swapViewHandler.listA導航到ships.xhtml
<navigation-rule>
<navigation-case>
<from-outcome>ships</from-outcome>
<to-view-id>hips.xhtml</to-view-id>
<redirect />
</navigation-case>
我需要處理用戶刷新(F5),以便在刷新發生在 cars.xhtml myFunction1被調用並重新填充listA(與汽車) 和ship.xhtml被刷新時myFunction2被調用並重新填充listA(帶有船舶)
cars.xhtml和ships.xhtml具有相同的backingbean(swapviewhandler)
,它們都含有
<c:forEach id="tablePicList" items="${swapViewHandler.listA}" var="entity" varStatus ="status">