private void bindFields() {

        m_formBinderAfter = new Binder<>();
        m_formBinderAfter.bind(m_messageAfter, CmsLoginMessage::getMessage, CmsLoginMessage::setMessage);

        m_formBinderAfter.bind(
            m_enabledAfter,
            loginMessage -> Boolean.valueOf(loginMessage.isEnabled()),
            (loginMessage, enabled) -> loginMessage.setEnabled(enabled.booleanValue()));

        m_formBinderAfter.bind(
            m_logoutAfter,
            loginMessage -> Boolean.valueOf(loginMessage.isLoginForbidden()),
            (loginMessage, forbidden) -> loginMessage.setLoginForbidden(forbidden.booleanValue()));

        m_formBinderAfter.forField(m_endTimeAfter).withValidator(
            endTime -> hasValidTimes(),
            CmsVaadinUtils.getMessageText(Messages.GUI_MESSAGES_LOGINMESSAGE_VAL_DATE_0)).bind(
                loginMessage -> loginMessage.getTimeEnd() != CmsLoginMessage.DEFAULT_TIME_END
                ? CmsDateField.dateToLocalDateTime(new Date(loginMessage.getTimeEnd()))
                : null,
                (loginMessage, endTime) -> loginMessage.setTimeEnd(
                    endTime != null
                    ? CmsDateField.localDateTimeToDate(endTime).getTime()
                    : CmsLoginMessage.DEFAULT_TIME_END));
        m_formBinderAfter.forField(m_startTimeAfter).withValidator(
            startTime -> hasValidTimes(),
            CmsVaadinUtils.getMessageText(Messages.GUI_MESSAGES_LOGINMESSAGE_VAL_DATE_0)).bind(
                loginMessage -> loginMessage.getTimeStart() != CmsLoginMessage.DEFAULT_TIME_START
                ? CmsDateField.dateToLocalDateTime(new Date(loginMessage.getTimeStart()))
                : null,
                (loginMessage, startTime) -> loginMessage.setTimeStart(
                    startTime != null
                    ? CmsDateField.localDateTimeToDate(startTime).getTime()
                    : CmsLoginMessage.DEFAULT_TIME_START));
        m_formBinderBefore = new Binder<>();
        m_formBinderBefore.bind(m_messageBefore, CmsLoginMessage::getMessage, CmsLoginMessage::setMessage);

        m_formBinderBefore.bind(
            m_enabledBefore,
            loginMessage -> Boolean.valueOf(loginMessage.isEnabled()),
            (loginMessage, enabled) -> loginMessage.setEnabled(enabled.booleanValue()));
    }
private void bindFields ( ) { m_formBinderAfter = new Binder < > ( ) ; m_formBinderAfter . bind ( m_messageAfter , CmsLoginMessage :: getMessage , CmsLoginMessage :: setMessage ) ; m_formBinderAfter . bind ( m_enabledAfter , loginMessage -> Boolean . valueOf ( loginMessage . isEnabled ( ) ) , ( loginMessage , enabled ) -> loginMessage . setEnabled ( enabled . booleanValue ( ) ) ) ; m_formBinderAfter . bind ( m_logoutAfter , loginMessage -> Boolean . valueOf ( loginMessage . isLoginForbidden ( ) ) , ( loginMessage , forbidden ) -> loginMessage . setLoginForbidden ( forbidden . booleanValue ( ) ) ) ; m_formBinderAfter . forField ( m_endTimeAfter ) . withValidator ( endTime -> hasValidTimes ( ) , CmsVaadinUtils . getMessageText ( Messages . GUI_MESSAGES_LOGINMESSAGE_VAL_DATE_0 ) ) . bind ( loginMessage -> loginMessage . getTimeEnd ( ) != CmsLoginMessage . DEFAULT_TIME_END ? CmsDateField . dateToLocalDateTime ( new Date ( loginMessage . getTimeEnd ( ) ) ) : null , ( loginMessage , endTime ) -> loginMessage . setTimeEnd ( endTime != null ? CmsDateField . localDateTimeToDate ( endTime ) . getTime ( ) : CmsLoginMessage . DEFAULT_TIME_END ) ) ; m_formBinderAfter . forField ( m_startTimeAfter ) . withValidator ( startTime -> hasValidTimes ( ) , CmsVaadinUtils . getMessageText ( Messages . GUI_MESSAGES_LOGINMESSAGE_VAL_DATE_0 ) ) . bind ( loginMessage -> loginMessage . getTimeStart ( ) != CmsLoginMessage . DEFAULT_TIME_START ? CmsDateField . dateToLocalDateTime ( new Date ( loginMessage . getTimeStart ( ) ) ) : null , ( loginMessage , startTime ) -> loginMessage . setTimeStart ( startTime != null ? CmsDateField . localDateTimeToDate ( startTime ) . getTime ( ) : CmsLoginMessage . DEFAULT_TIME_START ) ) ; m_formBinderBefore = new Binder < > ( ) ; m_formBinderBefore . bind ( m_messageBefore , CmsLoginMessage :: getMessage , CmsLoginMessage :: setMessage ) ; m_formBinderBefore . bind ( m_enabledBefore , loginMessage -> Boolean . valueOf ( loginMessage . isEnabled ( ) ) , ( loginMessage , enabled ) -> loginMessage . setEnabled ( enabled . booleanValue ( ) ) ) ; }
Binds the form fields.<p>