You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Rutger Jansen (JIRA)" <ji...@apache.org> on 2010/03/31 11:10:27 UTC
[jira] Created: (WICKET-2812) Textarea ignores first line in case
of blank line
Textarea ignores first line in case of blank line
-------------------------------------------------
Key: WICKET-2812
URL: https://issues.apache.org/jira/browse/WICKET-2812
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4.5
Environment: IE6 / FF3.6 / Opera9
Reporter: Rutger Jansen
When the content of a textarea starts with an empty line, this line disappears when it is placed in the html.
This is a known problem with the html textarea element.
<textarea>test</textarea> will result in the same as:
<textarea>
test</textarea>
Meaning that the first newline in the textarea is ignored. In case of opening a page with a textarea with a leading blank line, this line will be removed when the form is submitted again.
See for similar issues in the apache jira STR-1366 and BEEHIVE-1005
A possible solution is to change the following method in org.apache.wicket.markup.html.form.TextArea in something like:
protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {
checkComponentTag(openTag, "textarea");
String value = getValue();
if (value != null && value.startsWith("\n")) {
value = "\n" + value;
} else if (value != null && value.startsWith("\r\n")) {
value = "\r\n" + value;
} else if (value != null && value.startsWith("\r")) {
value = "\r" + value;
}
replaceComponentTagBody(markupStream, openTag, value);
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2812) Textarea ignores first line in case
of blank line
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892090#action_12892090 ]
Hudson commented on WICKET-2812:
--------------------------------
Integrated in Apache Wicket 1.5.x #168 (See [http://hudson.zones.apache.org/hudson/job/Apache%20Wicket%201.5.x/168/])
> Textarea ignores first line in case of blank line
> -------------------------------------------------
>
> Key: WICKET-2812
> URL: https://issues.apache.org/jira/browse/WICKET-2812
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.5
> Environment: IE6 / FF3.6 / Opera9
> Reporter: Rutger Jansen
> Assignee: Igor Vaynberg
> Fix For: 1.5-M1
>
> Attachments: TextArea.java.patch
>
>
> When the content of a textarea starts with an empty line, this line disappears when it is placed in the html.
> This is a known problem with the html textarea element.
> <textarea>test</textarea> will result in the same as:
> <textarea>
> test</textarea>
> Meaning that the first newline in the textarea is ignored. In case of opening a page with a textarea with a leading blank line, this line will be removed when the form is submitted again.
> See for similar issues in the apache jira STR-1366 and BEEHIVE-1005
> A possible solution is to change the following method in org.apache.wicket.markup.html.form.TextArea in something like:
> protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {
> checkComponentTag(openTag, "textarea");
> String value = getValue();
> if (value != null && value.startsWith("\n")) {
> value = "\n" + value;
> } else if (value != null && value.startsWith("\r\n")) {
> value = "\r\n" + value;
> } else if (value != null && value.startsWith("\r")) {
> value = "\r" + value;
> }
> replaceComponentTagBody(markupStream, openTag, value);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2812) Textarea ignores first line in case
of blank line
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2812:
----------------------------------
Fix Version/s: 1.5-M1
fix for 1.5, cannot change in 1.4 as it will change existing behavior
> Textarea ignores first line in case of blank line
> -------------------------------------------------
>
> Key: WICKET-2812
> URL: https://issues.apache.org/jira/browse/WICKET-2812
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.5
> Environment: IE6 / FF3.6 / Opera9
> Reporter: Rutger Jansen
> Fix For: 1.5-M1
>
>
> When the content of a textarea starts with an empty line, this line disappears when it is placed in the html.
> This is a known problem with the html textarea element.
> <textarea>test</textarea> will result in the same as:
> <textarea>
> test</textarea>
> Meaning that the first newline in the textarea is ignored. In case of opening a page with a textarea with a leading blank line, this line will be removed when the form is submitted again.
> See for similar issues in the apache jira STR-1366 and BEEHIVE-1005
> A possible solution is to change the following method in org.apache.wicket.markup.html.form.TextArea in something like:
> protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {
> checkComponentTag(openTag, "textarea");
> String value = getValue();
> if (value != null && value.startsWith("\n")) {
> value = "\n" + value;
> } else if (value != null && value.startsWith("\r\n")) {
> value = "\r\n" + value;
> } else if (value != null && value.startsWith("\r")) {
> value = "\r" + value;
> }
> replaceComponentTagBody(markupStream, openTag, value);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WICKET-2812) Textarea ignores first line in case
of blank line
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reassigned WICKET-2812:
-------------------------------------
Assignee: Igor Vaynberg
> Textarea ignores first line in case of blank line
> -------------------------------------------------
>
> Key: WICKET-2812
> URL: https://issues.apache.org/jira/browse/WICKET-2812
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.5
> Environment: IE6 / FF3.6 / Opera9
> Reporter: Rutger Jansen
> Assignee: Igor Vaynberg
> Fix For: 1.5-M1
>
> Attachments: TextArea.java.patch
>
>
> When the content of a textarea starts with an empty line, this line disappears when it is placed in the html.
> This is a known problem with the html textarea element.
> <textarea>test</textarea> will result in the same as:
> <textarea>
> test</textarea>
> Meaning that the first newline in the textarea is ignored. In case of opening a page with a textarea with a leading blank line, this line will be removed when the form is submitted again.
> See for similar issues in the apache jira STR-1366 and BEEHIVE-1005
> A possible solution is to change the following method in org.apache.wicket.markup.html.form.TextArea in something like:
> protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {
> checkComponentTag(openTag, "textarea");
> String value = getValue();
> if (value != null && value.startsWith("\n")) {
> value = "\n" + value;
> } else if (value != null && value.startsWith("\r\n")) {
> value = "\r\n" + value;
> } else if (value != null && value.startsWith("\r")) {
> value = "\r" + value;
> }
> replaceComponentTagBody(markupStream, openTag, value);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-2812) Textarea ignores first line in case
of blank line
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-2812.
-----------------------------------
Resolution: Fixed
> Textarea ignores first line in case of blank line
> -------------------------------------------------
>
> Key: WICKET-2812
> URL: https://issues.apache.org/jira/browse/WICKET-2812
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.5
> Environment: IE6 / FF3.6 / Opera9
> Reporter: Rutger Jansen
> Assignee: Igor Vaynberg
> Fix For: 1.5-M1
>
> Attachments: TextArea.java.patch
>
>
> When the content of a textarea starts with an empty line, this line disappears when it is placed in the html.
> This is a known problem with the html textarea element.
> <textarea>test</textarea> will result in the same as:
> <textarea>
> test</textarea>
> Meaning that the first newline in the textarea is ignored. In case of opening a page with a textarea with a leading blank line, this line will be removed when the form is submitted again.
> See for similar issues in the apache jira STR-1366 and BEEHIVE-1005
> A possible solution is to change the following method in org.apache.wicket.markup.html.form.TextArea in something like:
> protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {
> checkComponentTag(openTag, "textarea");
> String value = getValue();
> if (value != null && value.startsWith("\n")) {
> value = "\n" + value;
> } else if (value != null && value.startsWith("\r\n")) {
> value = "\r\n" + value;
> } else if (value != null && value.startsWith("\r")) {
> value = "\r" + value;
> }
> replaceComponentTagBody(markupStream, openTag, value);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2812) Textarea ignores first line in case
of blank line
Posted by "Erich Schreiner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Erich Schreiner updated WICKET-2812:
------------------------------------
Attachment: TextArea.java.patch
Patch as suggested above
> Textarea ignores first line in case of blank line
> -------------------------------------------------
>
> Key: WICKET-2812
> URL: https://issues.apache.org/jira/browse/WICKET-2812
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.5
> Environment: IE6 / FF3.6 / Opera9
> Reporter: Rutger Jansen
> Fix For: 1.5-M1
>
> Attachments: TextArea.java.patch
>
>
> When the content of a textarea starts with an empty line, this line disappears when it is placed in the html.
> This is a known problem with the html textarea element.
> <textarea>test</textarea> will result in the same as:
> <textarea>
> test</textarea>
> Meaning that the first newline in the textarea is ignored. In case of opening a page with a textarea with a leading blank line, this line will be removed when the form is submitted again.
> See for similar issues in the apache jira STR-1366 and BEEHIVE-1005
> A possible solution is to change the following method in org.apache.wicket.markup.html.form.TextArea in something like:
> protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {
> checkComponentTag(openTag, "textarea");
> String value = getValue();
> if (value != null && value.startsWith("\n")) {
> value = "\n" + value;
> } else if (value != null && value.startsWith("\r\n")) {
> value = "\r\n" + value;
> } else if (value != null && value.startsWith("\r")) {
> value = "\r" + value;
> }
> replaceComponentTagBody(markupStream, openTag, value);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.