P. 1
Primefaces Users Guide 3 2

Primefaces Users Guide 3 2

|Views: 280|Likes:

More info:

Published by: Peter Emerson Pinchao on Feb 18, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/29/2013

pdf

text

original

Imageswitch component is a simple image gallery component.

Info

Tag

imageSwitch

Component Class org.primefaces.component.imageswitch.ImageSwitch

Component Type org.primefaces.component.ImageSwitch

Component Family org.primefaces.component

Renderer Type

org.primefaces.component.ImageSwitchRenderer

Renderer Class

org.primefaces.component.imageswitch.ImageSwitchRenderer

Attributes

Name

Default

Type

Description

id

null

String

Unique identifier of the component

rendered

TRUE

Boolean

Boolean value to specify the rendering of the
component, when set to false component will not be
rendered.

binding

null

Object

An el expression that maps to a server side
UIComponent instance in a backing bean

widgetVar

null

String

Name of the client side widget.

effect

null

String

Name of the effect for transition.

speed

500

Integer

Speed of the effect in milliseconds.

slideshowSpeed

3000

Integer

Slideshow speed in milliseconds.

slideshowAuto

TRUE

Boolean

Starts slideshow automatically on page load.

style

null

String

Style of the main container.

styleClass

null

String

Style class of the main container.

PrimeFaces Userʼs Guide

218

Getting Started with ImageSwitch

ImageSwitch component needs a set of images to display. Provide the image collection as a set of
children components.

Most of the time, images could be dynamic, ui:repeat is supported to implement this case.


Slideshow or Manual

ImageSwitch is in slideShow mode by default, if you’d like manual transitions disable slideshow
and use client side api to create controls.

//images

Previous
Next

Client Side API

Method

Description

void previous()

Switches to previous image.

void next()

Switches to next image.

void startSlideshow()

Starts slideshow mode.

void stopSlideshow()

Stops slideshow mode.

voud pauseSlideshow();

Pauses slideshow mode.

void toggleSlideShow()

Toggles slideshow mode.

PrimeFaces Userʼs Guide

219

Effect Speed

The speed is considered in terms of milliseconds and specified via the speed attribute.

//set of images

List of Effects

ImageSwitch supports a wide range of transition effects. Following is the full list, note that values
are case sensitive.

•blindX
•blindY
•blindZ
•cover
•curtainX
•curtainY
•fade
•fadeZoom
•growX
•growY
•none
•scrollUp
•scrollDown
•scrollLeft
•scrollRight
•scrollVert
•shuffle
•slideX
•slideY
•toss
•turnUp
•turnDown
•turnLeft
•turnRight
•uncover
•wipe
•zoom

PrimeFaces Userʼs Guide

220

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->