You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Andrey Rybin (JIRA)" <ji...@apache.org> on 2010/02/16 14:55:27 UTC

[jira] Created: (CLK-627) Field.getRequestValue optional value trim()

Field.getRequestValue optional value trim()
-------------------------------------------

                 Key: CLK-627
                 URL: https://issues.apache.org/jira/browse/CLK-627
             Project: Click
          Issue Type: Improvement
          Components: core
    Affects Versions: 2.1.0
            Reporter: Andrey Rybin


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).





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-627) Field.getRequestValue optional value trim()

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834476#action_12834476 ] 

Malcolm Edgar commented on CLK-627:
-----------------------------------

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.

> Field.getRequestValue optional value trim()
> -------------------------------------------
>
>                 Key: CLK-627
>                 URL: https://issues.apache.org/jira/browse/CLK-627
>             Project: Click
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.1.0
>            Reporter: Andrey Rybin
>             Fix For: 2.2.0
>
>
> 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).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CLK-627) Field.getRequestValue optional value trim()

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834476#action_12834476 ] 

Malcolm Edgar edited comment on CLK-627 at 2/16/10 9:20 PM:
------------------------------------------------------------

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

      was (Author: medgar):
    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.
  
> Field.getRequestValue optional value trim()
> -------------------------------------------
>
>                 Key: CLK-627
>                 URL: https://issues.apache.org/jira/browse/CLK-627
>             Project: Click
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.1.0
>            Reporter: Andrey Rybin
>             Fix For: 2.2.0
>
>
> 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).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CLK-627) Field.getRequestValue optional value trim()

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob Schellink updated CLK-627:
------------------------------

    Fix Version/s: 2.2.0

Sounds good to me, something like "trimRequestValue".

> Field.getRequestValue optional value trim()
> -------------------------------------------
>
>                 Key: CLK-627
>                 URL: https://issues.apache.org/jira/browse/CLK-627
>             Project: Click
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.1.0
>            Reporter: Andrey Rybin
>             Fix For: 2.2.0
>
>
> 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).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CLK-627) Field.getRequestValue optional value trim()

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob Schellink resolved CLK-627.
-------------------------------

    Resolution: Fixed

fixed in trunk

> Field.getRequestValue optional value trim()
> -------------------------------------------
>
>                 Key: CLK-627
>                 URL: https://issues.apache.org/jira/browse/CLK-627
>             Project: Click
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.1.0
>            Reporter: Andrey Rybin
>             Fix For: 2.2.0
>
>
> 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).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-627) Field.getRequestValue optional value trim()

Posted by "Andrey Rybin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845011#action_12845011 ] 

Andrey Rybin commented on CLK-627:
----------------------------------

Начиная с 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


> Field.getRequestValue optional value trim()
> -------------------------------------------
>
>                 Key: CLK-627
>                 URL: https://issues.apache.org/jira/browse/CLK-627
>             Project: Click
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.1.0
>            Reporter: Andrey Rybin
>             Fix For: 2.2.0
>
>
> 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).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.