You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexandru Objelean (JIRA)" <ji...@apache.org> on 2007/09/06 12:16:31 UTC

[jira] Created: (WICKET-934) textfield strings are not trimmed when performing validation (conversion).

textfield strings are not trimmed when performing validation (conversion).
--------------------------------------------------------------------------

                 Key: WICKET-934
                 URL: https://issues.apache.org/jira/browse/WICKET-934
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta3
            Reporter: Alexandru Objelean


I've discovered the following issue:
When using a DateTextField in a form (with the format: dd/MM/yyyy), user by mistake add an extra space (for instance: "06/09/2007 ") and submit the form. The are two problems:

1) I would expect the convertor to convert this value correct, but the AbstractConverter.parse method throws a ConversionException because: (position.getIndex() != stringValue.length()).

2) The above exception is not reported anywhere, because validate method does not check if the input is valid after converting its value: 

Forum link: "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html"

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


[jira] Updated: (WICKET-934) textfield strings are not trimmed when performing validation (conversion).

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

Igor Vaynberg updated WICKET-934:
---------------------------------

    Fix Version/s: 1.3.0-beta4
         Assignee: Igor Vaynberg

> textfield strings are not trimmed when performing validation (conversion).
> --------------------------------------------------------------------------
>
>                 Key: WICKET-934
>                 URL: https://issues.apache.org/jira/browse/WICKET-934
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>
> I've discovered the following issue:
> When using a DateTextField in a form (with the format: dd/MM/yyyy), user by mistake add an extra space (for instance: "06/09/2007 ") and submit the form. The are two problems:
> 1) I would expect the convertor to convert this value correct, but the AbstractConverter.parse method throws a ConversionException because: (position.getIndex() != stringValue.length()).
> 2) The above exception is not reported anywhere, because validate method does not check if the input is valid after converting its value: 
> Forum link: "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html"

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


[jira] Updated: (WICKET-934) textfield strings are not trimmed when performing validation (conversion).

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

Igor Vaynberg updated WICKET-934:
---------------------------------

    Attachment: mylyn-context.zip

> textfield strings are not trimmed when performing validation (conversion).
> --------------------------------------------------------------------------
>
>                 Key: WICKET-934
>                 URL: https://issues.apache.org/jira/browse/WICKET-934
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: mylyn-context.zip
>
>
> I've discovered the following issue:
> When using a DateTextField in a form (with the format: dd/MM/yyyy), user by mistake add an extra space (for instance: "06/09/2007 ") and submit the form. The are two problems:
> 1) I would expect the convertor to convert this value correct, but the AbstractConverter.parse method throws a ConversionException because: (position.getIndex() != stringValue.length()).
> 2) The above exception is not reported anywhere, because validate method does not check if the input is valid after converting its value: 
> Forum link: "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html"

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


[jira] Commented: (WICKET-934) textfield strings are not trimmed when performing validation (conversion).

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525610 ] 

Igor Vaynberg commented on WICKET-934:
--------------------------------------

added a comment to the above mentioned thread

> textfield strings are not trimmed when performing validation (conversion).
> --------------------------------------------------------------------------
>
>                 Key: WICKET-934
>                 URL: https://issues.apache.org/jira/browse/WICKET-934
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>
> I've discovered the following issue:
> When using a DateTextField in a form (with the format: dd/MM/yyyy), user by mistake add an extra space (for instance: "06/09/2007 ") and submit the form. The are two problems:
> 1) I would expect the convertor to convert this value correct, but the AbstractConverter.parse method throws a ConversionException because: (position.getIndex() != stringValue.length()).
> 2) The above exception is not reported anywhere, because validate method does not check if the input is valid after converting its value: 
> Forum link: "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html"

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


[jira] Commented: (WICKET-934) textfield strings are not trimmed when performing validation (conversion).

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525926 ] 

Igor Vaynberg commented on WICKET-934:
--------------------------------------

see subversion commits tab, its already fixed :)

> textfield strings are not trimmed when performing validation (conversion).
> --------------------------------------------------------------------------
>
>                 Key: WICKET-934
>                 URL: https://issues.apache.org/jira/browse/WICKET-934
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: mylyn-context.zip
>
>
> I've discovered the following issue:
> When using a DateTextField in a form (with the format: dd/MM/yyyy), user by mistake add an extra space (for instance: "06/09/2007 ") and submit the form. The are two problems:
> 1) I would expect the convertor to convert this value correct, but the AbstractConverter.parse method throws a ConversionException because: (position.getIndex() != stringValue.length()).
> 2) The above exception is not reported anywhere, because validate method does not check if the input is valid after converting its value: 
> Forum link: "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html"

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


[jira] Resolved: (WICKET-934) textfield strings are not trimmed when performing validation (conversion).

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

Igor Vaynberg resolved WICKET-934.
----------------------------------

    Resolution: Fixed

> textfield strings are not trimmed when performing validation (conversion).
> --------------------------------------------------------------------------
>
>                 Key: WICKET-934
>                 URL: https://issues.apache.org/jira/browse/WICKET-934
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: mylyn-context.zip
>
>
> I've discovered the following issue:
> When using a DateTextField in a form (with the format: dd/MM/yyyy), user by mistake add an extra space (for instance: "06/09/2007 ") and submit the form. The are two problems:
> 1) I would expect the convertor to convert this value correct, but the AbstractConverter.parse method throws a ConversionException because: (position.getIndex() != stringValue.length()).
> 2) The above exception is not reported anywhere, because validate method does not check if the input is valid after converting its value: 
> Forum link: "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html"

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


[jira] Commented: (WICKET-934) textfield strings are not trimmed when performing validation (conversion).

Posted by "Kent Tong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525921 ] 

Kent Tong commented on WICKET-934:
----------------------------------

For 1), getInput() is indeed not trimming the nput.

For 2), it does report the error:

			final IConverter converter = getConverter(getType());
			try
			{
				convertedInput = converter.convertToObject(getInput(), getLocale());
			}
			catch (ConversionException e)
			{
				ValidationError error = new ValidationError();
				if (e.getResourceKey() != null)
				{
					error.addMessageKey(e.getResourceKey());
				}
				...
			}


> textfield strings are not trimmed when performing validation (conversion).
> --------------------------------------------------------------------------
>
>                 Key: WICKET-934
>                 URL: https://issues.apache.org/jira/browse/WICKET-934
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: mylyn-context.zip
>
>
> I've discovered the following issue:
> When using a DateTextField in a form (with the format: dd/MM/yyyy), user by mistake add an extra space (for instance: "06/09/2007 ") and submit the form. The are two problems:
> 1) I would expect the convertor to convert this value correct, but the AbstractConverter.parse method throws a ConversionException because: (position.getIndex() != stringValue.length()).
> 2) The above exception is not reported anywhere, because validate method does not check if the input is valid after converting its value: 
> Forum link: "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html"

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