use of com.hack23.cia.web.impl.ui.application.views.pageclicklistener.RegisterUserClickListener in project cia by Hack23.
the class MainViewRegisterPageModContentFactoryImpl method createContent.
@Secured({ "ROLE_ANONYMOUS" })
@Override
public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
final VerticalLayout content = createPanelContent();
final String pageId = getPageId(parameters);
getMenuItemFactory().createMainPageMenuBar(menuBar);
final VerticalLayout registerLayout = new VerticalLayout();
registerLayout.setSizeFull();
final Panel formPanel = new Panel();
formPanel.setSizeFull();
registerLayout.addComponent(formPanel);
final FormLayout formContent = new FormLayout();
formPanel.setContent(formContent);
final RegisterUserRequest reqisterRequest = new RegisterUserRequest();
reqisterRequest.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId());
reqisterRequest.setUsername("");
reqisterRequest.setEmail("");
reqisterRequest.setCountry("");
reqisterRequest.setUserpassword("");
final ClickListener reqisterListener = new RegisterUserClickListener(reqisterRequest);
getFormFactory().addRequestInputFormFields(formContent, reqisterRequest, RegisterUserRequest.class, AS_LIST, REGISTER, reqisterListener);
final VerticalLayout overviewLayout = new VerticalLayout();
overviewLayout.setSizeFull();
content.addComponent(overviewLayout);
content.setExpandRatio(overviewLayout, ContentRatio.LARGE);
final ResponsiveRow grid = createGridLayout(overviewLayout);
createRowComponent(grid, registerLayout, "Register a new user");
panel.setCaption(NAME + "::" + CITIZEN_INTELLIGENCE_AGENCY_MAIN);
getPageActionEventHelper().createPageEvent(ViewAction.VISIT_MAIN_VIEW, ApplicationEventGroup.USER, CommonsViews.MAIN_VIEW_NAME, parameters, pageId);
return content;
}
Aggregations