2016-05-05 71 views
0

primefaces移動commandLink操作不起作用,它不會使用id="station1"加載頁面。 f:setPropertyActionListener是工作,並呼籲setSelectedStation()方法。commandLink不工作primefaces移動

<pm:page id="fastStationPage"> 
    <pm:header title="Fast Charging Station" swatch="b" ></pm:header> 

    <pm:content> 
     <h:form id="stationsDetailsForm"> 
      <p:growl id="messages" showDetail="true" /> 
      <p:dataList value="#{navigationViewImpl.fastStationList}" var="station" type="ordered"> 
       <p:commandLink value="#{station.name}" action="pm:station1?transition=slide" update=":station1:stationDetail"> 
        <f:setPropertyActionListener value="#{station}" target="#{navigationViewImpl.selectedStation}" /> 
       </p:commandLink> 
      </p:dataList> 
     </h:form> 
    </pm:content> 
</pm:page> 

<pm:page id="station1"> 
    <pm:content> 
     <h:outputText id="stationDetail" value="#{navigationViewImpl.selectedStation.name}" escape="false"/> 
    </pm:content> 
</pm:page> 

public void setSelectedStation(StationDTO selectedStation) { 
    this.selectedStation = selectedStation; 
} 
+0

改進了格式化,請避免代碼之間有多條白線。謝謝! – cramopy

回答

0

我得到了答案。我沒有配置face-config.xml文件。我不添加導航處理程序

<application> 
    <navigation-handler> 
     org.primefaces.mobile.application.MobileNavigationHandler 
    </navigation-handler> 
</application>