protected void createLoginFormView ( final Flow flow ) { val propertiesToBind = CollectionUtils . wrapList ( "username" , "password" , "source" ) ; val binder = createStateBinderConfiguration ( propertiesToBind ) ; casProperties . getView ( ) . getCustomLoginFormFields ( ) . forEach ( ( field , props ) -> { val fieldName = String . format ( "customFields[%s]" , field ) ; binder . addBinding ( new BinderConfiguration . Binding ( fieldName , props . getConverter ( ) , props . isRequired ( ) ) ) ; } ) ; val state = createViewState ( flow , CasWebflowConstants . STATE_ID_VIEW_LOGIN_FORM , "casLoginView" , binder ) ; state . getRenderActionList ( ) . add ( createEvaluateAction ( CasWebflowConstants . ACTION_ID_RENDER_LOGIN_FORM ) ) ; createStateModelBinding ( state , CasWebflowConstants . VAR_ID_CREDENTIAL , UsernamePasswordCredential . class ) ; val transition = createTransitionForState ( state , CasWebflowConstants . TRANSITION_ID_SUBMIT , CasWebflowConstants . STATE_ID_REAL_SUBMIT ) ; val attributes = transition . getAttributes ( ) ; attributes . put ( "bind" , Boolean . TRUE ) ; attributes . put ( "validate" , Boolean . TRUE ) ; attributes . put ( "history" , History . INVALIDATE ) ; }
Create login form view .