Yep. That is the bit I'm stuck on. I think the id should be the id in the parent document but I don't know how to get that onto the HTML coming out of the child component. Although I think that is the way to go it means the root element in the Panel should/must not declare a wicket:id...
Starting to think I'm flogging a dead hourse but I'd still like to keep the encapsulation of saying what HTML should be rendered inside the child component while avoiding the cruft element. Perhaps I'll just have to tell the HTML monkey not to complain about the extra spans and divs. Thanks Sam Doug Donohoe wrote: > > I think in order to support updates, you need an output id on the <ul> > element. I assume that is what you want to replace ... Have you tried > adding a wicket:id to the <ul> and then calling setOutputMarkupId() on > that element? > > -Doug > > > > > Sam Hough wrote: >> >> Is there a nice way to make a component that behaves like Panel but >> replaces the surrogate element AND supports Ajax partial updates? >> >> So if my parent HTML is: >> >> <span wicket:id="here" >to be replaced</span> >> >> >> and my child panel is: >> >> <wicket:panel><ul><li>Must only have a single root >> element</li</ul></wicket:panel> >> >> my output would be: >> >> <ul><li>Must only have a single root element</li></ul> >> >> I've almost got this behaviour by using setRenderBodyOnly(true); but then >> I loose the id I need for Ajax partial updates. >> >> Any thoughts? >> >> Thanks >> >> Sam >> > > -- View this message in context: http://www.nabble.com/Panel-that-replaces-surrogate-element-rather-than-contained-within-it-tp16894472p16895549.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
