Class WTextArea

    • Constructor Detail

      • WTextArea

        public WTextArea()
    • Method Detail

      • getData

        public Object getData()
        The data for this WTextArea. If the text area is not rich text its output is XML escaped so we can ignore sanitization. If the text area is a rich text area then we check the sanitizeOnOutput flag as sanitization is rather resource intensive.
        Specified by:
        getData in interface DataBound
        Overrides:
        getData in class WBeanComponent
        Returns:
        The data for this WTextArea.
      • setData

        public void setData​(Object data)
        Set data in this component. If the WTextArea is a rich text input we need to sanitize the input.
        Specified by:
        setData in interface DataBound
        Overrides:
        setData in class WBeanComponent
        Parameters:
        data - The input data
      • getRows

        public int getRows()
        Returns:
        the number of rows of text that are visible without scrolling.
      • setRows

        public void setRows​(int rows)
        Sets the number of rows of text that are visible without scrolling.
        Parameters:
        rows - the number of rows.
      • isRichTextArea

        public boolean isRichTextArea()
        Returns:
        true if the field is in rich text mode.
      • setRichTextArea

        public void setRichTextArea​(boolean richTextArea)
        Pass true to put the field into rich text mode.
        Parameters:
        richTextArea - the number of rows
      • setSanitizeOnOutput

        public void setSanitizeOnOutput​(boolean sanitize)
        Pass true if you need to run the HTML sanitizer on any output. This is only needed if the textarea is rich text as in other cases the output will be XML encoded.
        Parameters:
        sanitize - true if output sanitization is required.
      • isSanitizeOnOutput

        public boolean isSanitizeOnOutput()
        Returns:
        true if this text area is to be sanitized on output.
      • sanitizeOutputText

        protected String sanitizeOutputText​(String text)
        Parameters:
        text - the output text to sanitize
        Returns:
        the sanitized text
      • sanitizeInputText

        protected String sanitizeInputText​(String text)
        Parameters:
        text - the input text to sanitize
        Returns:
        the sanitized text
      • setAutocomplete

        public void setAutocomplete​(Multiline value)
        Description copied from interface: AutocompleteableMultiline
        Set the autocomplete attribute to indicate auto-fill of a multi-line field.
        Specified by:
        setAutocomplete in interface AutocompleteableMultiline
        Parameters:
        value - the type of multiline field being autofilled: currently only one value - "street-address"
      • setFullStreetAddressAutocomplete

        public void setFullStreetAddressAutocomplete​(AddressType value)
        Description copied from interface: AutocompleteableMultiline
        Set the autocomplete attribute to indicate auto-fill of a multi-line street address of a given address type (shipping or billing).
        Specified by:
        setFullStreetAddressAutocomplete in interface AutocompleteableMultiline
        Parameters:
        value - the type of multiline field being autofilled: currently only one value - "street-address"
      • getComponentModel

        protected WTextArea.TextAreaModel getComponentModel()
        Returns the effective component model for this component. Subclass may override this method to narrow the return type to their specific model type.
        Overrides:
        getComponentModel in class WTextField
        Returns:
        the effective component model
      • getOrCreateComponentModel

        protected WTextArea.TextAreaModel getOrCreateComponentModel()
        Retrieves the model for this component so that it can be modified. If this method is called during request processing, and a session specific model does not yet exist, then a new model is created. Subclasses may override this method to narrow the return type to their specific model type.
        Overrides:
        getOrCreateComponentModel in class WTextField
        Returns:
        the model for this component