p:selectBooleanButton primefaces-mobile不会改变

时间:2014-03-23 15:15:28

标签: jsf jsf-2 primefaces primefaces-mobile

我的p:selectBooleanButton没有响应任何点击,并且在我点击它时会在响应的角落有这个复选框,但按钮上的标签根本没有变化!也许有人有这个问题,可以帮助我。我使用primefaces 3.5和primefaces-mobile 0.9.5与glassfish 3.1.2.2服务器。

<f:view xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    xmlns:pm="http://primefaces.org/mobile"
    contentType="text/html"
    renderKitId="PRIMEFACES_MOBILE">
<pm:page id="page" title="reservation"> 
    <f:facet name="postinit">
        <link rel="stylesheet"
              href="#{request.contextPath}/javax.faces.resource/calendar/calendar.css.jsf?ln=primefaces-mobile" />  
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/jquery.mobile-1.4.0.css" />
        <h:outputScript library="js" name="jquery.mobile-1.4.0.js" target="head" /> 
        <h:outputScript library="primefaces-mobile" name="calendar/calendar.js" /> 

    </f:facet>       
    <pm:view id="menu" swatch="a" >   
        <pm:header title="reservation">  
            <f:facet name="left"><p:button value="Back" icon="back" onclick="PrimeFaces.back()"/>
            </f:facet>
        </pm:header>
        <pm:content > 
            <h:form >  
                <p:growl id="messageOverlay" />  
                <h4>reservation date</h4>             
                <p:calendar value="#{reservationBean.reservDate}" mode="popup" pattern="dd/MM/yyyy HH:mm" stepMinute="30" mindate="01/01/2014"/> 
                <h4>party size</h4>
                <pm:inputRange id="range" minValue="0" maxValue="20" value="#{reservationBean.reservPartySize}"  />

                <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
                    <h:selectOneMenu value="#{reservationBean.reservZone}" >
                        <f:selectItem  itemLabel="Outside" itemValue="outside" /> 
                        <f:selectItem itemLabel="Inside" itemValue="inside" />  
                        <f:selectItem itemLabel="Vip" itemValue="vip" />  
                    </h:selectOneMenu> 

                    <p:selectBooleanButton  onLabel="yes" offLabel="no" value="#{reservationBean.smokingFlag}" label="aa" />

                </h:panelGrid> 
                <p:commandLink style="width:20%" actionListener="#{reservationBean.reservate}"  update=":basicDialog" oncomplete="dlg.show();">
                    <p:graphicImage style="width: 20%;border: 0; " value="/resources/images/reservation.png" />  
                </p:commandLink>
            </h:form> 
            <p:growl id="basicDialog" showDetail="true" life="5000" />  
        </pm:content>  
    </pm:view>  
</pm:page>   

`

0 个答案:

没有答案