Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1308

TextArea trims content when saved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-final
    • 1.3.2
    • wicket
    • None
    • java 5 on safari and firefox, though it does not matter ;)

    Description

      the TextArea uses the default convertValue( String[] ) method which trims it's content.
      This causes me problems, so my component needs to be defined thus:

      add( new TextArea( "content" )
      {
      protected Object convertValue(String[] value) throws ConversionException

      { return value != null && value.length > 0 && value[0] != null ? value[0] : null; }

      });

      Which overrides and removes the trim() call.
      Suggest this override should be in TextArea, maybe optional?

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            handyande Andrew Williams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: