use of org.linkki.core.ui.section.DefaultPmoBasedSectionFactory in project linkki by linkki-framework.
the class MessageUI method init.
@Override
protected void init(VaadinRequest request) {
Page.getCurrent().setTitle("linkki Samples :: Validation Messages");
VaadinSession.getCurrent().setConverterFactory(new LinkkiConverterFactory());
MessagesPanel messagesPanel = new MessagesPanel();
messagesPanel.setVisible(false);
User user = new User();
RegistrationSectionPmo registrationPmo = new RegistrationSectionPmo(user, u -> handleRegistration(messagesPanel, u));
// tag::validation-service[]
validationService = new RegistrationValidationService(registrationPmo);
bindingManager = new RegistrationBindingManager(validationService, ml -> messagesPanel.updateMessages(ml));
// end::validation-service[]
DefaultPmoBasedSectionFactory sectionFactory = new DefaultPmoBasedSectionFactory();
AbstractSection section = sectionFactory.createSection(registrationPmo, bindingManager.getExistingContextOrStartNewOne(getClass()));
setContent(new VerticalLayout(messagesPanel, section));
}
use of org.linkki.core.ui.section.DefaultPmoBasedSectionFactory in project linkki by linkki-framework.
the class GettingStartedUI method init.
@Override
protected void init(VaadinRequest request) {
Page.getCurrent().setTitle("Linkki :: Getting Started");
DefaultPmoBasedSectionFactory sectionFactory = new DefaultPmoBasedSectionFactory();
AbstractSection section = sectionFactory.createSection(new ReportSectionPmo(new Report()), new BindingContext("report-context", PropertyBehaviorProvider.NO_BEHAVIOR_PROVIDER, Handler.NOP_HANDLER));
setContent(section);
}
Aggregations