protected LabeledTextAreaPanel < String , DeregistrationModelBean > newMotivation ( final String id , final IModel < DeregistrationModelBean > model ) { final IModel < String > labelModel = ResourceModelFactory . newResourceModel ( ResourceBundleKey . builder ( ) . key ( "sem.main.feedback.deregistration.user.label" ) . defaultValue ( "Please confirm the deregistration" ) . parameters ( ListExtensions . toObjectArray ( getDomainName ( ) ) ) . build ( ) , this ) ; final IModel < String > placeholderModel = ResourceModelFactory . newResourceModel ( "global.enter.your.deregistration.motivation.label" , this , "Enter here your deregistration motivation." ) ; final LabeledTextAreaPanel < String , DeregistrationModelBean > description = new LabeledTextAreaPanel < String , DeregistrationModelBean > ( id , model , labelModel ) { /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1L ; /** * {@inheritDoc} */ @ Override protected TextArea < String > newTextArea ( final String id , final IModel < DeregistrationModelBean > model ) { final TextArea < String > textArea = super . newTextArea ( id , model ) ; if ( placeholderModel != null ) { textArea . add ( new AttributeAppender ( "placeholder" , placeholderModel ) ) ; } return textArea ; } } ; return description ; }
Factory method for creating the LabeledTextAreaPanel . This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a Form .