use of org.olat.core.gui.components.choice.Choice in project OpenOLAT by OpenOLAT.
the class FlexiTableElementImpl method customizeCallout.
protected void customizeCallout(UserRequest ureq) {
Choice choice = getColumnListAndTheirVisibility();
callout = new CloseableCalloutWindowController(ureq, wControl, choice, customButton, "Customize", true, "o_sel_flexi_custom_callout");
callout.activate();
callout.addControllerListener(this);
}
use of org.olat.core.gui.components.choice.Choice in project OpenOLAT by OpenOLAT.
the class FlexiTableElementImpl method dispatchEvent.
@Override
public void dispatchEvent(UserRequest ureq, Component source, Event event) {
if (source instanceof Choice) {
if (Choice.EVNT_VALIDATION_OK.equals(event)) {
Choice visibleColsChoice = (Choice) source;
setCustomizedColumns(ureq, visibleColsChoice);
} else if (Choice.EVNT_FORM_RESETED.equals(event)) {
resetCustomizedColumns(ureq);
}
if (callout != null) {
callout.deactivate();
callout = null;
}
} else if (searchFieldEl.getComponent() == source) {
if (event instanceof AutoCompleteEvent) {
AutoCompleteEvent ace = (AutoCompleteEvent) event;
doSearch(ureq, FlexiTableSearchEvent.QUICK_SEARCH_KEY_SELECTION, ace.getKey(), null);
}
}
}
use of org.olat.core.gui.components.choice.Choice in project OpenOLAT by OpenOLAT.
the class FlexiTableElementImpl method getColumnListAndTheirVisibility.
private Choice getColumnListAndTheirVisibility() {
Choice choice = new Choice("colchoice", getTranslator());
choice.setModel(new VisibleFlexiColumnsModel(dataModel.getTableColumnModel(), enabledColumnIndex, getTranslator()));
choice.addListener(this);
choice.setEscapeHtml(false);
choice.setCancelKey("cancel");
choice.setSubmitKey("save");
choice.setResetKey("reset");
choice.setElementCssClass("o_table_config");
return choice;
}
use of org.olat.core.gui.components.choice.Choice in project openolat by klemens.
the class FlexiTableElementImpl method getColumnListAndTheirVisibility.
private Choice getColumnListAndTheirVisibility() {
Choice choice = new Choice("colchoice", getTranslator());
choice.setModel(new VisibleFlexiColumnsModel(dataModel.getTableColumnModel(), enabledColumnIndex, getTranslator()));
choice.addListener(this);
choice.setEscapeHtml(false);
choice.setCancelKey("cancel");
choice.setSubmitKey("save");
choice.setResetKey("reset");
choice.setElementCssClass("o_table_config");
return choice;
}
use of org.olat.core.gui.components.choice.Choice in project openolat by klemens.
the class FlexiTableElementImpl method dispatchEvent.
@Override
public void dispatchEvent(UserRequest ureq, Component source, Event event) {
if (source instanceof Choice) {
if (Choice.EVNT_VALIDATION_OK.equals(event)) {
Choice visibleColsChoice = (Choice) source;
setCustomizedColumns(ureq, visibleColsChoice);
} else if (Choice.EVNT_FORM_RESETED.equals(event)) {
resetCustomizedColumns(ureq);
}
if (callout != null) {
callout.deactivate();
callout = null;
}
} else if (searchFieldEl.getComponent() == source) {
if (event instanceof AutoCompleteEvent) {
AutoCompleteEvent ace = (AutoCompleteEvent) event;
doSearch(ureq, FlexiTableSearchEvent.QUICK_SEARCH_KEY_SELECTION, ace.getKey(), null);
}
}
}
Aggregations