I have a list which i am passing to carousel component and having 'n' number of slides. When i click on next button, it navigates to the next slide. I would like to store the data of current slide, when the user clicks on next button (which is there on top right corner of carousel). Is there any onclick functionality available in carousel of primefaces? If not, how can we do that using javascript?
Also how can i remove the default button icons appearing on the header of carousel?
Carousel functionality
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
There is no callback for pagination yet, feel free to submit a feature request.
maybe it is too late for you but this is what I did:
I used styles and got rid of all the header and buttons stuff on the top. Now javascript can control the back and forth movement of the carousel tabs...
I need to one up this, as I know I always have 3 tabs in my carousel: 'a', 'b', 'c' and instead of n() and p() , I'd like to got to 'b' or go to 'c' (or back 'a') without having to remember where i am and which direction to go..
HTH: btw: PrimeFaces 3.0 general release.
Code: Select all
<p:carousel widgetVar="rnd" rows="1" itemStyle="height:50px;width:400px;" effect="easeInStrong" >
//blah blah blah
</p:carousel>
<p:commandButton value="next" type="button" onclick="n();"/>
<p:commandButton value="prev" type="button" onclick="p();"/>
<f:verbatim>
<script type="text/javascript">
//<![CDATA[
function n()
{
rnd.nextButton.click();
}
function p()
{
rnd.prevButton.click();
}
//]]>
</script>
I need to one up this, as I know I always have 3 tabs in my carousel: 'a', 'b', 'c' and instead of n() and p() , I'd like to got to 'b' or go to 'c' (or back 'a') without having to remember where i am and which direction to go..
HTH: btw: PrimeFaces 3.0 general release.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests