1

My p:selectBooleanButton doesn't respond on any click and has this check box at the corner that does respond when I click on it but the label on the button doesn't change at all! maybe someone had this problem and can help me. I'm using primefaces 3.5 and primefaces-mobile 0.9.5 with glassfish 3.1.2.2 server.

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

`

Sashkoz
  • 11
  • 2
  • I think that your custom css affects 'p:selectBooleanButton' – Lost Heaven 0809 Mar 23 '14 at 17:52
  • what css are you talking about? – Sashkoz Mar 24 '14 at 01:39
  • I don't know about your custom css, therefor i can't answer your question. But: Look html out, i see 'p:selectBooleanButton' has root is 'check box' and 'check box' has 'display:none'. in your code, 'check box' is not 'display:none' means your custom css affects 'p:selectBooleanButton' – Lost Heaven 0809 Mar 24 '14 at 08:54
  • i checked the same button in regular jsf file and it is working fine but as i put it in the jsf with renderKitId="PRIMEFACES_MOBILE" it starting to look akward and not working! i think there is a problem with the mobile version render... so i think primefaces has to fix it someday – Sashkoz Mar 24 '14 at 14:32

0 Answers0