use of org.ovirt.engine.ui.common.presenter.FragmentParams in project ovirt-engine by oVirt.
the class AbstractMainWithDetailsPresenter method onReveal.
@Override
protected void onReveal() {
super.onReveal();
setInSlot(TYPE_SetSearchPanel, searchPanelPresenterWidget);
setInSlot(TYPE_SetBreadCrumbs, breadCrumbsPresenterWidget);
if (hasActionPanelPresenterWidget()) {
getTable().setActionMenus(getActionPanelPresenterWidget().getActionButtons());
}
breadCrumbsPresenterWidget.hideSelectedName();
breadCrumbsPresenterWidget.rebuildBreadCrumbs();
getView().resizeToFullHeight();
PlaceRequest currentPlace = placeManager.getCurrentPlaceRequest();
Set<FragmentParams> params = FragmentParams.getParams(currentPlace);
params.forEach(param -> {
switch(param) {
case SEARCH:
String search = currentPlace.getParameter(FragmentParams.SEARCH.getName(), "");
if (!"".equals(search)) {
// We have a search parameter. The tokenizer has already run it through URL decode so we should be
// able to simply pass it to setSearchString in the model.
applySearchString(getModel().getDefaultSearchString() + search);
}
break;
default:
break;
}
});
}
Aggregations