hello
I would like to create a simple 2 state button/checkbox/radio button whatever I would like to style this component to look like a standard vaadin button ( it can have 2 states visually : normal and pressed)
my idea was to use a standard butttons I saw that there is a “v-pressed” class added to the buttons html when it is pressed/clicked So basically I tried to add/remove this style to/from the button on each click
In firefox it is ok BUT in IE it isn’t
@Override
public void buttonClick(ClickEvent event) {
Button buttonClicked= event.getButton();
if (buttonClicked == addTicketButton){
openAddTicketWindow();
}
if (buttonClicked == quickSearchButton){
String searchTerm = quickSearchTextField.toString();
Filter filter= new SimpleStringFilter("dpc_name", searchTerm, true, false);
IndexedContainer tc =(IndexedContainer) myTickets.getContainerDataSource();
tc.removeAllContainerFilters();
tc.addContainerFilter(filter);
}
if (buttonClicked == ticketModeSupervisor || buttonClicked == ticketModeCoordinator || buttonClicked == ticketModeOwner){
int ticketMode=(Integer) buttonClicked.getData();
System.out.println("Ticket mode: "+ticketMode);
myTickets.setTicketMode(ticketMode);
viewBottom.setItemDataSource(null);
Iterator<Component> ticketModeIterator = ticketModeLayout.getComponentIterator();
while (ticketModeIterator.hasNext()){
ticketModeIterator.next().removeStyleName(TICKET_MODE_ACTIVE);
}
buttonClicked.addStyleName(TICKET_MODE_ACTIVE);
}
}
what should I do to make it work in every browser? Do I have to add/remove additional styles to make it work ?