【问题标题】:commandLink not work primefaces mobilecommandLink 不起作用 primefaces mobile
【发布时间】:2016-05-05 09:12:50
【问题描述】:

primefaces 移动命令链接操作不起作用,它没有加载带有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;
}

【问题讨论】:

  • 改进了格式,请避免代码之间有超过一条白线。谢谢!

标签: primefaces-mobile


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2012-08-12
    • 1970-01-01
    • 2014-09-07
    • 1970-01-01
    • 2013-05-22
    • 2013-03-07
    • 1970-01-01
    • 2013-11-14
    • 2011-03-30
    相关资源
    最近更新 更多