package org.icefaces.tooltip; import java.io.Serializable; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import javax.faces.event.ActionEvent; import javax.faces.event.ValueChangeEvent; import javax.faces.model.SelectItem; @ManagedBean @SessionScoped public class AttributeBean implements Serializable { private boolean rendered, global; private String forValue="outputText", position="topLeft", targetPosition="bottomRight", showEffect="fade", hideEffect="fade", showEvent="mouseover", hideEvent="mouseout"; private SelectItem[] forValues = new SelectItem[] { new SelectItem("outputText"), new SelectItem("inputText"), new SelectItem("image"), }; private SelectItem[] positions = new SelectItem[] { new SelectItem("topLeft"), new SelectItem("topRight"), new SelectItem("bottomLeft"), new SelectItem("bottomRight"), }; private SelectItem[] targetPositions = new SelectItem[] { new SelectItem("topLeft"), new SelectItem("topRight"), new SelectItem("bottomLeft"), new SelectItem("bottomRight"), }; private SelectItem[] showEffects = new SelectItem[] { new SelectItem("fade"), new SelectItem("slide"), new SelectItem("explode"), new SelectItem("clip"), }; private SelectItem[] hideEffects = new SelectItem[] { new SelectItem("fade"), new SelectItem("slide"), new SelectItem("explode"), new SelectItem("clip"), }; private SelectItem[] showEvents = new SelectItem[] { new SelectItem("mouseover"), new SelectItem("focus"), new SelectItem("mousedown"), new SelectItem("keydown"), }; private SelectItem[] hideEvents = new SelectItem[] { new SelectItem("mouseout"), new SelectItem("blur"), new SelectItem("mouseup"), new SelectItem("keyup"), }; public boolean isRendered() { return rendered; } public void setRendered(boolean rendered) { this.rendered = rendered; } public boolean isGlobal() { return global; } public void setGlobal(boolean global) { this.global = global; } public String getForValue() { return forValue; } public void setForValue(String forValue) { this.forValue = forValue; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } public String getTargetPosition() { return targetPosition; } public void setTargetPosition(String targetPosition) { this.targetPosition = targetPosition; } public String getShowEffect() { return showEffect; } public void setShowEffect(String showEffect) { this.showEffect = showEffect; } public String getHideEffect() { return hideEffect; } public void setHideEffect(String hideEffect) { this.hideEffect = hideEffect; } public String getShowEvent() { return showEvent; } public void setShowEvent(String showEvent) { this.showEvent = showEvent; } public String getHideEvent() { return hideEvent; } public void setHideEvent(String hideEvent) { this.hideEvent = hideEvent; } public SelectItem[] getForValues() { return forValues; } public SelectItem[] getPositions() { return positions; } public SelectItem[] getTargetPositions() { return targetPositions; } public SelectItem[] getShowEffects() { return showEffects; } public SelectItem[] getHideEffects() { return hideEffects; } public SelectItem[] getShowEvents() { return showEvents; } public SelectItem[] getHideEvents() { return hideEvents; } private String value = "value 1"; public String getValue() { return value; } public void setValue(String value) { this.value = value; } private int count = 1; public void displayListener() { System.out.println("displayListener"); count++; this.value = "value " + count; } }