jsf - Primefaces carousel next() and prev() methods are not working in version 5.3 and 6.0 -


i using primefaces 5.2 jsf 2.2. there not problem using of primefaces carousel next() , prev() navigation methods until upgrading new version 5.3 (or 6.0) of primefaces. there idea solution of problem.

i had problem too. solution found use setpage . example:

 function carouselnext()       {         var currentpage = pf('wcarouseldistro').page;         var totalpages = pf('wcarouseldistro').totalpages - 1;         var c = (currentpage === (totalpages));         if (!c)         {           pf('wcarouseldistro').setpage(currentpage + 1);         }       }     function carouselprev()       {         var currentpage = pf('wcarouseldistro').page;         if (currentpage !== 0)         {           pf('wcarouseldistro').setpage(currentpage - 1)         }       } 

my components.

<p:graphicimage id="s1" library="images" name="prev-icon.png"                               style="display: inline-block; cursor: pointer;" onclick="carouselprev();" />   <p:graphicimage id="s7" library="images/ulcs" name="next-icon.png" style="display: inline-block; cursor: pointer;" onclick="carouselnext();" /> 

i hope have helped!


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -