Friday, January 2, 2015

Primefaces responsive theme

In order to render a mobile content for primefaces framework bases web application:
just follow these 2 steps:
  1. in faces config.xmln add

    1
    2
    3
    4
    5
    6
    7
    <!-- Primefaces mobile themes navigation handler -->
      <navigation-handler>
        org.primefaces.mobile.application.MobileNavigationHandler
      </navigation-handler>
     
    <!-- Instead of declaring render kit for each page, render kit is application scoped -->
    <default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id>
    "
  2. at the top of your xhtml or jsf or ... whatever extesion choosen for files that will be processed by jsf servlet  add this taglib:
    "
pm taglib offers many possibilities such as view pagination like :
1
2
3
4
<pm:page id="page1">
 </pm:page>
<pm:page id="page2">
 </pm:page>

to define inside the same view many pages

No comments:

Post a Comment