Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Chosen Styling - HomeView.java
package com.arcbees.chosenstyling.client.application.home;
// Some imports
public class HomeView extends ViewImpl implements HomePresenter.MyView {
// Some code
private static final ChosenDarkResources CHOSEN_RESOURCES_DARK = GWT.create(ChosenDarkResources.class);
@UiField(provided = true)
ChosenListBox singleChosenDark;
@UiField(provided = true)
MultipleChosenValueListBox<Choices> multipleValuesDark;
@Inject
HomeView(Binder uiBinder) {
ChosenOptions chosenOptionsDark = new ChosenOptions();
chosenOptionsDark.setResources(CHOSEN_RESOURCES_DARK);
// If your widget is a single Chosen widget
singleChosenDark = new ChosenListBox(chosenOptionsDark);
// Or if it's a multiple Chosen widget
multipleValuesDark = new MultipleChosenValueListBox<>(new ChoiceRenderer(), chosenOptionsDark);
initWidget(uiBinder.createAndBindUi(this));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment