You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kent Tong (JIRA)" <ji...@apache.org> on 2007/08/19 07:51:30 UTC
[jira] Created: (WICKET-862) isComponentOnAjaxResponse() chokes on
multiline AJAX response
isComponentOnAjaxResponse() chokes on multiline AJAX response
-------------------------------------------------------------
Key: WICKET-862
URL: https://issues.apache.org/jira/browse/WICKET-862
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.3.0-beta2
Reporter: Kent Tong
In isComponentOnAjaxResponse() in BaseWicketTester, the dot in the regular expression won't match newline characters and thus will fail:
public Result isComponentOnAjaxResponse(Component component)
{
...
boolean isComponentInAjaxResponse = ajaxResponse.matches(".*<component id=\"" + markupId
+ "\" ?>.*");
...
}
Suggest changing it to:
public Result isComponentOnAjaxResponse(Component component)
{
...
boolean isComponentInAjaxResponse = ajaxResponse.matches("(?s).*<component id=\"" + markupId
+ "\" ?>.*");
...
}
BTW I found this error when trying to update a feedback panel whose markup spreads across lines.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-862) isComponentOnAjaxResponse() chokes on
multiline AJAX response
Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Baptiste Quenot resolved WICKET-862.
-----------------------------------------
Resolution: Duplicate
> isComponentOnAjaxResponse() chokes on multiline AJAX response
> -------------------------------------------------------------
>
> Key: WICKET-862
> URL: https://issues.apache.org/jira/browse/WICKET-862
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta2
> Reporter: Kent Tong
>
> In isComponentOnAjaxResponse() in BaseWicketTester, the dot in the regular expression won't match newline characters and thus will fail:
> public Result isComponentOnAjaxResponse(Component component)
> {
> ...
> boolean isComponentInAjaxResponse = ajaxResponse.matches(".*<component id=\"" + markupId
> + "\" ?>.*");
> ...
> }
> Suggest changing it to:
> public Result isComponentOnAjaxResponse(Component component)
> {
> ...
> boolean isComponentInAjaxResponse = ajaxResponse.matches("(?s).*<component id=\"" + markupId
> + "\" ?>.*");
> ...
> }
> BTW I found this error when trying to update a feedback panel whose markup spreads across lines.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.