[
https://issues.apache.org/jira/browse/WICKET-4187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martín Bigio updated WICKET-4187:
---------------------------------
Description:
There is a bug in the DefaultMarkupSourcingStrategy when it comes to resolve
markup for a components that has the same ID that another one in the page
For example given the following markup:
<form wicket:id="form" />
...
</form>
<form wicket:id="form" />
<div wicket:id="ajaxTabPannel" />
</form>
When swithing tabs DefaultMarkupSourcingStrategy fails to get the appropiate
markup of a component given the markup of it's parent. As you can see in line
95 of DefaultMarkupSourcingStrategy, the class searches for any component
having the ID in process:
line 95: markup = markup.find(child.getId());
The result of this bug is that in the end a MarkupNotFoundException is thrown
cause no markup could be found because it was searched in the wrong container
(the first form instead of the second one).
Please let me know if this isn't a bug of the 1.5 serie (does it requiries
unique IDs all over the hierarchy?). A simple workaround is to have different
names for the components in conflic.
was:
There is a bug in the DefaultMarkupSourcingStrategy when it comes to resolve
markup for a components that has the same ID that another one in the page
For example given the following markup:
<form wicket:id="form" />
...
</form>
<form wicket:id="form" />
<div wicket:id="ajaxTabPannel" />
</form>
When swithing tabs DefaultMarkupSourcingStrategy fails to get the appropiate
markup of a component given the markup of it's parent. As you can see in line
95 of DefaultMarkupSourcingStrategy, the class searches for any component
having the ID in process:
line 95: markup = markup.find(child.getId());
The result of this bug is that in the end a MarkupNotFoundException is thrown
cause no markup could be found because it was searched in the wrong container
(the first form instead of the second one).
Please let me know if this isn't a bug of the 1.5 serie (does it requiries
unique IDs all over the hierarchy?). A simple workaround is to have different
names for the components in conflic.
Ops, i wrote wrong the markup. This is the problematic situation:
<form wicket:id="form" />
...
</form>
<div wicket:di="someContainer">
<form wicket:id="form" />
<div wicket:id="ajaxTabPannel" />
</form>
<div>
> Problem resolving markup in DefaultMarkupSourcingStrategy
> ---------------------------------------------------------
>
> Key: WICKET-4187
> URL: https://issues.apache.org/jira/browse/WICKET-4187
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.2
> Reporter: Martín Bigio
>
> There is a bug in the DefaultMarkupSourcingStrategy when it comes to resolve
> markup for a components that has the same ID that another one in the page
> For example given the following markup:
> <form wicket:id="form" />
> ...
> </form>
> <form wicket:id="form" />
> <div wicket:id="ajaxTabPannel" />
> </form>
> When swithing tabs DefaultMarkupSourcingStrategy fails to get the appropiate
> markup of a component given the markup of it's parent. As you can see in line
> 95 of DefaultMarkupSourcingStrategy, the class searches for any component
> having the ID in process:
> line 95: markup = markup.find(child.getId());
> The result of this bug is that in the end a MarkupNotFoundException is thrown
> cause no markup could be found because it was searched in the wrong container
> (the first form instead of the second one).
> Please let me know if this isn't a bug of the 1.5 serie (does it requiries
> unique IDs all over the hierarchy?). A simple workaround is to have different
> names for the components in conflic.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira