addOrReplace will copy the id for you. you just have to make sure that the component you are replacing has its setOutputMarkupId() set to true during the initial non-ajax render. from then on everything will work the same.
-igor On Thu, Apr 11, 2013 at 3:01 PM, Nick Pratt <nbpr...@gmail.com> wrote: > I use addOrReplace fairly frequently in normal requests, but Im having > trouble making this work in an Ajax request. > > 1. Add EmptyPanel("someId"); to page > 2. User clicks link, and then on the server side I do: addOrReplace(new > DetailPanel("someId")); > and the Details Panel appears in place of the EmptyPanel. > > How do I make this work in an AjaxLink? > > In order to update the component via Ajax, I need its markupId in the > existing markup - EmptyPanel doesnt have one (or has a different one to the > DetailPanel). > > Should I set the markupId of the EmptyPanel and the constructed DetailPanel > to be the same value? > > Regards > > Nick --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org