use of com.hack23.cia.web.impl.ui.application.views.pageclicklisteners.handlers.impl.SearchDocumentResponseHandlerImpl in project cia by Hack23.
the class SearchDocumentPageModContentFactoryImpl method createContent.
@Secured({ "ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout panelContent = createPanelContent();
final String pageId = getPageId(parameters);
documentMenuItemFactory.createDocumentsMenuBar(menuBar);
final VerticalLayout searchLayout = new VerticalLayout();
searchLayout.setSizeFull();
panelContent.addComponent(searchLayout);
final VerticalLayout searchresultLayout = new VerticalLayout();
searchresultLayout.setSizeFull();
final Panel formPanel = new Panel();
formPanel.setSizeFull();
searchresultLayout.addComponent(formPanel);
final FormLayout formContent = new FormLayout();
formPanel.setContent(formContent);
panelContent.addComponent(searchresultLayout);
panelContent.setExpandRatio(searchresultLayout, ContentRatio.LARGE);
final SearchDocumentRequest searchRequest = new SearchDocumentRequest();
searchRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
searchRequest.setMaxResults(MAX_RESULT_SIZE);
searchRequest.setSearchExpression("");
getFormFactory().addRequestInputFormFields(formContent, searchRequest, SearchDocumentRequest.class, AS_LIST, SEARCH, new SearchDocumentClickListener(searchRequest, new SearchDocumentResponseHandlerImpl(getGridFactory(), formPanel, searchresultLayout)));
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_DOCUMENT_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
return panelContent;
}
Aggregations