commandLink不能使用primefaces mobile

时间:2016-05-05 09:12:50

标签: primefaces-mobile

primefaces mobile commandLink操作不起作用,它没有使用id="station1"加载页面。 f:setPropertyActionListener正在工作并致电setSelectedStation()方法。

<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;
}

1 个答案:

答案 0 :(得分:0)

我得到了答案。我没有配置face-config.xml文件。我不是添加导航处理程序

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