<s> from muntjac . api import VerticalLayout , TextField , PasswordField , TextArea <EOL> from muntjac . data . property import IValueChangeListener <EOL> class TextFieldInputPromptExample ( VerticalLayout , IValueChangeListener ) : <EOL> def __init__ ( self ) : <EOL> super ( TextFieldInputPromptExample , self ) . __init__ ( ) <EOL> self . setSpacing ( True ) <EOL> self . setMargin ( True , False , False , False ) <EOL> username = TextField ( ) <EOL> username . setInputPrompt ( '<STR_LIT>' ) <EOL> username . setImmediate ( True ) <EOL> username . addListener ( self , IValueChangeListener ) <EOL> self . addComponent ( username ) <EOL> password = PasswordField ( ) <EOL> password . setInputPrompt ( '<STR_LIT>' ) <EOL> password . setImmediate ( True ) <EOL> password . addListener ( self , IValueChangeListener ) <EOL> self . addComponent ( password ) <EOL> comment = TextArea ( ) <EOL> comment . setInputPrompt ( '<STR_LIT>' ) <EOL> comment . setRows ( <NUM_LIT:3> ) <EOL> comment . setImmediate ( True ) <EOL> comment . addListener ( self , IValueChangeListener ) <EOL> self . addComponent ( comment ) <EOL> def valueChange ( self , event ) : <EOL> self . getWindow ( ) . showNotification ( '<STR_LIT>' <EOL> + str ( event . getProperty ( ) ) ) </s>
