Directory

← Back

ToggleSelect

Toggle button that changes selection with each click, with optional navigation buttons.

Author

Rating

Popularity

<100

ToggleSelect is an AbstractSelect that takes a container and displays one of the selected values as a caption. When the button is clicked, next value is selected. Optionally, ToggleSelect can have navigation buttons (for easy navigation back and forth, with customisable captions), it is also possible to specify order which the values are selected in by default (forward or backwards). Lastly, there is an option to specify the property to be used as a main caption.

This component was developed as a case study during the lectures "Web Application Development with Vaadin", held at the University of Turku in 2014.

Sample code

ToggleSelect select = new ToggleSelect(Arrays.asList("hello", "world", "this", "is", "ToggleSelect!!"));
select.setCaption("Toggle select, have fun: ");
		
select.addValueChangeListener(new Property.ValueChangeListener() {
	@Override
	public void valueChange(ValueChangeEvent event) {
		Notification.show("ToggleSelect's value is <"+event.getProperty().getValue()+">");
	}
});
select.setNavigationWrapped(true);
select.setNavigationVisible(true);
select.setForwardOnClick(true);
select.setNavigateBackCaption("<<");
select.setNavigateForwardCaption(">>");
// select.setCaptionPropertyId("aProperty");

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

ToggleSelect was updated to work with Vaadin 7.6; no functional changes

Released
2016-01-18
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.6+
Vaadin 7.1+ in 0.2.0
Browser
Firefox
Opera
Safari
Google Chrome
Android Browser
Internet Explorer
Internet Explorer

ToggleSelect - Vaadin Add-on Directory

Toggle button that changes selection with each click, with optional navigation buttons. ToggleSelect - Vaadin Add-on Directory
ToggleSelect is an AbstractSelect that takes a container and displays one of the selected values as a caption. When the button is clicked, next value is selected. Optionally, ToggleSelect can have navigation buttons (for easy navigation back and forth, with customisable captions), it is also possible to specify order which the values are selected in by default (forward or backwards). Lastly, there is an option to specify the property to be used as a main caption. This component was developed as a case study during the lectures "Web Application Development with Vaadin", held at the University of Turku in 2014.
Online