In 1.0 there is no way, as far as I know. In 1.1 this problem should be fixed.
Juergen On 7/17/05, damnitjim <[EMAIL PROTECTED]> wrote: > Hi, I'm currently using the AutoComponentResolver (wicket 1.0) to add > a component within a form. The form executes a search and returns a > list of search results. On the submit event, I run the query and > display the search result below the form. > > <form wicket:id="form"> > …. > <wicket:component name="xyz" class="MyClass"/> > …. > </form> > > I don't forward or redirect when the form is submitted and I don't > hide the form either. The AutocomponentResolver is trying to re-add > the <wicket:component name="xyz"> when the form is submitted and the > same page is re-displayed with the search result and I'm getting the > following exception: > > java.lang.IllegalArgumentException: A child with id 'xyz' already exists: > at wicket.MarkupContainer.add(MarkupContainer.java:138) > at wicket.MarkupContainer.autoAdd(MarkupContainer.java:165) > at wicket.AutoComponentResolver.resolve(AutoComponentResolver.java:95) > at wicket.MarkupContainer.renderNext(MarkupContainer.java:865) > > What can I do to make it so that wicket doesn't try to re-add the component? > > > Thanks! > > Aye >
