please check that BorderBodyResolver is registered with the Application. It should actually handle this. The FormBorder test case is similar. I'd be interested why this is not working with your application.
In general though what you did, re-assigning the body to properly match the markup hierarchy, is what IMO is the preferred option (provided the *Resolver would work; the resolver is magic and I don't like that to much). remove() is not needed. Just link.add(getBodyContainer()). add() should automatically remove the "old" parent (I hope). The onattach approach would be magic, which is why I don't like the idea too much. In 2.0 when we were able to get the associated markup fragment at any time, we were able to scan it and re-assign the body when adding the "link" component. In 1.3 we are not yet able to do it. Juergen On 7/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
On 7/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > On 7/10/07, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: > > Today I've committed the new Border to 1.3 trunk. I would appreciate > > if you could do a quick check of your applications using Borders to > > make sure everthing is working as expected. Thanks. > > Hi Juergen. We are experiencing some problems with it and we're > looking into it right now. > here is what i had to do to fix it: 1. OrderByBorder 2. =================================================================== 3. --- . (revision 555042) 4. +++ . (working copy) 5. @@ -65,6 +67,12 @@ 6. }; 7. add(link); 8. add(new OrderByLink.CssModifier(link, cssProvider)); 9. + 10. + WebMarkupContainer body = getBodyContainer(); 11. + remove(body); 12. + link.add(body); 13. + 14. + 15. } 16. 17. /** as you can see, the structure is like so <wicket:border><a wicket:id="link"><wicket:body/></a></wicket:border> that means that the new borderbodycontainer has to be nested inside the link just like it is in markup. however right now it is somewhat clumsy to do, as you have to remove/readd because border automatically adds the body container in. what we should do is have webmarkupcontainer border.getborderbodyparent() that can be overridden. then, maybe border can do the move i do, but in onattach() to create a proper nesting? -igor