public E buildTextComponent ( ) { final E textComponent = createTextComponent ( ) ; textComponent . setRequired ( required ) ; textComponent . setImmediate ( immediate ) ; textComponent . setReadOnly ( readOnly ) ; textComponent . setEnabled ( enabled ) ; if ( ! StringUtils . isEmpty ( caption ) ) { textComponent . setCaption ( caption ) ; } if ( ! StringUtils . isEmpty ( style ) ) { textComponent . setStyleName ( style ) ; } if ( ! StringUtils . isEmpty ( styleName ) ) { textComponent . addStyleName ( styleName ) ; } if ( ! StringUtils . isEmpty ( prompt ) ) { textComponent . setInputPrompt ( prompt ) ; } if ( maxLengthAllowed > 0 ) { textComponent . setMaxLength ( maxLengthAllowed ) ; } if ( ! StringUtils . isEmpty ( id ) ) { textComponent . setId ( id ) ; } if ( ! validators . isEmpty ( ) ) { validators . forEach ( textComponent :: addValidator ) ; } textComponent . setNullRepresentation ( "" ) ; return textComponent ; }
Build a textfield