public void preconfigureInput ( InputComponent < ? , ? > input , WithAttributes atts ) { if ( atts != null ) { input . setEnabled ( atts . enabled ( ) ) ; input . setLabel ( atts . label ( ) ) ; input . setRequired ( atts . required ( ) ) ; input . setRequiredMessage ( atts . requiredMessage ( ) ) ; input . setDescription ( atts . description ( ) ) ; input . setDeprecated ( atts . deprecated ( ) ) ; input . setDeprecatedMessage ( atts . deprecatedMessage ( ) ) ; // Set input type if ( ! InputType . DEFAULT . equals ( atts . type ( ) ) ) { input . getFacet ( HintsFacet . class ) . setInputType ( atts . type ( ) ) ; } // Set Default Value if ( ! atts . defaultValue ( ) . isEmpty ( ) ) { InputComponents . setDefaultValueFor ( converterFactory , ( InputComponent < ? , Object > ) input , atts . defaultValue ( ) ) ; } // Set Note if ( ! atts . note ( ) . isEmpty ( ) ) { input . setNote ( atts . note ( ) ) ; } } }
Pre - configure input based on WithAttributes info if annotation exists