Create a quickstart and attach it to a Jira issue please.


On 05/14/2013 04:37 PM, Nico wrote:

I migrated my application from Wicket 1.5.10 to 6.7

During testing I recognized that during an ajax update (replacement) of a
component, the markup of the component is twice in the HTML markup (the old
and the new markup). Thus the execution of javascript inside a component may
fail due to the fact, that two components with the same id are present in
the HTML markup.


<a wicket:id="testlink">testlink</a>
<div wicket:id="testbox" style="width: 100px; height:
100px; border: 1px solid #ccc;">
        <script type="text/javascript">

final WebMarkupContainer testbox = new WebMarkupContainer("testbox");

add(new AjaxLink<Void>("testlink") {
        private static final long serialVersionUID = 1L;

        public void onClick(AjaxRequestTarget target) {

So while the ajax update is processed the 'testbox' DIV and its javascript
are present twice (the old and new DIV). If the javascript is a little more
complex and for example changes stuff inside the DIV, the javascript will
change stuff in the old instead of the new DIV container.

My javascript relies on the fact, that an id should always be present just

Why is the old DIV not removed first, before the new DIV is appended? Can I
change this behavior somehow?

Thanks in advance

View this message in context:
Sent from the Users forum mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to