Uploaded image for project: 'Click'
  1. Click
  2. CLK-627

Field.getRequestValue optional value trim()

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: core
    • Labels:
      None

      Description

      Field class contains method:

      protected String getRequestValue() {
      String value = getContext().getRequestParameter(getName());
      if (value != null)

      { return value.trim(); //<--- here }

      else

      { return ""; }

      }

      Most of the time - trim is very nice feature (I like trim .

      But sometimes I need field "as is" with all its spaces.

      Can You add option for optional trim?

      It should be enabled by default (current behavior), but if somebody need spaces, he can disable trim (for specific field).

        Activity

        Hide
        sabob Bob Schellink added a comment -

        Sounds good to me, something like "trimRequestValue".

        Show
        sabob Bob Schellink added a comment - Sounds good to me, something like "trimRequestValue".
        Hide
        medgar Malcolm Edgar added a comment - - edited

        Yeah I don't think this method should be trimming the value by default, but this is the current behaviour so I dont think we can change this.

        +1 on adding a trim parameter

        Show
        medgar Malcolm Edgar added a comment - - edited Yeah I don't think this method should be trimming the value by default, but this is the current behaviour so I dont think we can change this. +1 on adding a trim parameter
        Hide
        sabob Bob Schellink added a comment -

        fixed in trunk

        Show
        sabob Bob Schellink added a comment - fixed in trunk
        Hide
        rybin.andrey@gmail.com Andrew P Fink added a comment -

        Начиная с 9 марта я несколько дней проведу в больнице, где не смогу
        проверять почту и отвечать на письма.

        Как только у меня представится возможность, я сразу отвечу на Ваше письмо.

        Спасибо!


        Best regards,
        Andrey P.Rybin

        e-mail/gtalk/jabber: rybin.andrey@gmail.com
        mob.: +7(915)405-4296
        Tel: +7(347)293-45-19
        Fax: +7(347)293-09-13
        sip: 2983927@sipnet.ru

        Show
        rybin.andrey@gmail.com Andrew P Fink added a comment - Начиная с 9 марта я несколько дней проведу в больнице, где не смогу проверять почту и отвечать на письма. Как только у меня представится возможность, я сразу отвечу на Ваше письмо. Спасибо! – Best regards, Andrey P.Rybin e-mail/gtalk/jabber: rybin.andrey@gmail.com mob.: +7(915)405-4296 Tel: +7(347)293-45-19 Fax: +7(347)293-09-13 sip: 2983927@sipnet.ru

          People

          • Assignee:
            Unassigned
            Reporter:
            andreyrybin Andrew Fink
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development