0 Replies Latest reply on Jul 7, 2014 6:05 AM by mlg27

    Mobile application multipage

    mlg27

      I'm using jsf2, eclipse, primefaces 5.0 and gatein portal 3.6.0.

       

      In faces config i have:

        <application>

      <navigation-handler>

      org.primefaces.mobile.application.MobileNavigationHandler

      </navigation-handler>

      </application>

       

      <application>

        <default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id>

      </application>

       

      The problem is that the 2 pm:page are rendered when the application initiates.

       

      the xhtml:

       

      <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:p="http://primefaces.org/ui"
         xmlns:pm="http://primefaces.org/mobile"
           contentType="text/html" >
          
          <h:head >
          
             <script src="http://maps.google.com/maps/api/js?v=3&amp;sensor=false"></script>
            <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
            
            
            <script type="text/javascript">
            
               function fillId()
               {
               //   setId("#{idBean.idform}");
               }
               
            </script>
            
          </h:head>
      
      
          <h:body >
             
             <pm:page id="pmpage">
                  <h:form id="form" >
                     <p:accordionPanel id="acp" style="width:100%;height:100%;" >
                     
                        <p:tab title="Escolhe Divisão" >
                         <h:panelGrid columns="2" style="margin-bottom:5px" cellpadding="5"> 
                           
                                     <p:outputLabel for="freg" value="Freguesias: " />
                                   <p:selectBooleanCheckbox id="freg"  />
                           
                                     <p:outputLabel for="muni" value="Municipios: "/>
                                   <p:selectBooleanCheckbox id="muni" value="#{dataManager.muniChecked}" >
                                            <!-- <p:ajax event="change" process="@parent" oncomplete="showMunicipios()"/>-->
                                   </p:selectBooleanCheckbox>
                                
                                     <p:outputLabel for="dist" value="Distritos: " />
                                   <p:selectBooleanCheckbox id="dist" value="#{dataManager.distChecked}" >
                                            <!--<p:ajax event="change" process="@parent" oncomplete="showDistritos()"/>-->
                                   </p:selectBooleanCheckbox>
                             
                                     <p:outputLabel for="marc" value="Activar Marcadores: " />
                                   <p:selectBooleanCheckbox id="marc" disabled="#{checkBean.disabledMarc}">
                                     <f:ajax event="change" process="@this" listener="#{checkBean.marcChanged}"/>
                                   </p:selectBooleanCheckbox>
                            
                        </h:panelGrid>
                        
                        </p:tab>
                        
                        
                          <p:tab title="Visualização lotes">
                              <h:panelGrid columns="2" style="margin-bottom:5px" cellpadding="5">
                           
                              
                             <h:outputText value="Selecionar: " />
                             <p:selectBooleanCheckbox id="sel" disabled="#{checkBean.disabledSel}" rendered="true">
                             
                             </p:selectBooleanCheckbox>
                              
                             <p:button  outcome="pm:second" value="go"></p:button>
                             
                             
                             </h:panelGrid >
                          
                          </p:tab>
        
              
                      </p:accordionPanel>
                   </h:form>
                
       
       
            </pm:page>
            
            <pm:page id="second">
            
               <pm:header></pm:header>
               <pm:content styleClass="jqm-content">
                    <pm:inputSlider maxValue="10" minValue="1"></pm:inputSlider>
                   <p:panelGrid columns="2">
                       <p:commandButton id="btn-basic" value="Basic" type="button"/>
                       <p:commandButton id="btn-dynamic" value="Dynamic" type="button"/>
                   </p:panelGrid>
       
               </pm:content>
       
               <p:overlayPanel for="btn-basic" widgetVar="pnl-basic" at="right" showEffect="overlay">
                    <h2>Panel Content</h2>
                    <p:menu>
                        <p:menuitem value="Link 1" url="#" />
                        <p:menuitem value="Link 2" url="#" />
                        <p:menuitem value="Link 3" url="#" />
                    </p:menu>
                </p:overlayPanel>
       
                <p:overlayPanel for="btn-dynamic" widgetVar="pnl-dynamic" at="right" showEffect="overlay" dynamic="true">
                    <h2>Dynamic Content</h2>
                    <p>This content is loaded on demand to speed up initial page load time.</p>
                </p:overlayPanel>
                
            </pm:page>
      
          </h:body>
          
      </f:view>
      

       

       

      Can anyone help me?