Jsf p:选择BooleanButton和#x27;不变

Jsf p:选择BooleanButton和#x27;不变,jsf,jsf-2,primefaces,primefaces-mobile,Jsf,Jsf 2,Primefaces,Primefaces Mobile,我的p:selectBooleanButton在任何单击时都不会响应,并且在角落处有一个复选框,当我单击它时,它会响应,但按钮上的标签一点也不会改变!也许有人有这个问题,可以帮助我。我在glassfish 3.1.2.2服务器上使用primefaces 3.5和primefaces mobile 0.9.5 <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"

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

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

预定日期
聚会规模

`

我认为您的自定义css会影响“p:selectBooleanButton”您在说什么css?我不知道您的自定义css,因此我无法回答您的问题。但是:看看html,我看到'p:selectBooleanButton'的根是'CheckBox','CheckBox'的根是'display:none'。在您的代码中,“复选框”不是“display:none”意味着您的自定义css影响“p:selectBooleanButton”我在常规jsf文件中选中了相同的按钮,它工作正常,但当我使用renderKitId=“PRIMEFACES_MOBILE”将其放入jsf时,它开始看起来不正常且不工作!我认为移动版渲染有问题。。。所以我认为primefaces总有一天会修复它