I'm having trouble with borders as well. This markup is within a page and I use a component resolver and in the debug I see requests for the 'primaryWrapper' (PrimaryWrapper is a class derived from Border. I then see the resolve request to resolve 'aboutUsPanel'. The panel is created and added to the MarkupContainer passed into the resolve method (maybe in a border it needs to be addAuto'd to a different parent perhaps?)
If I replace the aboutUsPanel span tag with some literal text everything worlds fine. It appears to be a problem with the nesting of a panel within the border component. <wicket:extend> <div id="content"> <div wicket:id="primaryWrapper"> <span wicket:id="aboutUsPanel" /> </div> <div wicket:id = "secondaryWrapper"> Some text </div> </div> </wicket:extend> The error I get is: ERROR - RequestCycle - Tag expected [markup = wicket\markup\com\sas\av\ui\wicket\templates\original\PrimaryWrapper_35. html <html> <body> <wicket:border> <!-- start primary section --> <div id="primary-section " class="post"> Hi there <wicket:body/> Yo </div> </wicket:border> </body> </html> , index = 4, current = [Raw markup]] org.apache.wicket.markup.MarkupException: Tag expected [markup = wicket\markup\com\sas\av\ui\wicket\templates\original\PrimaryWrapper_35. html <html> <body> <wicket:border> <!-- start primary section --> <div id="primary-section " class="post"> Hi there <wicket:body/> Yo </div> </wicket:border> </body> </html> , index = 4, current = [Raw markup]] at org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream. java:465) at org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:269) at org.apache.wicket.Component.render(Component.java:2433) at org.apache.wicket.Component.render(Component.java:2405) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:225) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:250) at com.sas.av.ui.wicket.templates.original.ComponentLibraryResolver.resolve (ComponentLibraryResolver.java:85) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1601) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav a:1525) at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onCompon entTagBody(Border.java:380) at org.apache.wicket.Component.renderComponent(Component.java:2626) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1601) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer .java:675) at org.apache.wicket.markup.html.border.Border.onComponentTagBody(Border.ja va:305) at org.apache.wicket.Component.renderComponent(Component.java:2626) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.Component.render(Component.java:2405) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:225) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:250) at com.sas.av.ui.wicket.templates.original.ComponentLibraryResolver.resolve (ComponentLibraryResolver.java:85) "Back in my day we didn't need Tapestry, or Wicket or WebObjects, or even Servlets, or for that matter Java! We just coded in plain assembly language. And before that we had to just type in 1's and 0's. Sometimes we didn't even have 1's. I once had to code for an entire month, barefoot, in the dead of winter, using just 0's... but you didn't hear me complaining." > -----Original Message----- > From: Jason Lea [mailto:ja...@kumachan.net.nz] > Sent: Saturday, 18 July 2009 8:12 AM > To: users@wicket.apache.org > Subject: Re: border error > > is it due to closing the tabs div with the short version <div /> instead > of <div></div>? > I had a feeling wicket doesn't like the <div /> version... > > Fernando Wermus wrote: > > Igor, > > Here it is: the border is in the page. > > > > <wicket:extend> > > <div wicket:id="tabs" /> > > <div wicket:id="border"> > > > > <span wicket:id="label">label contents here</span> > > </div> > > </wicket:extend> > > > > On Fri, Jul 17, 2009 at 1:34 PM, Igor Vaynberg > <igor.vaynb...@gmail.com>wrote: > > > > > >> you dont have <div wicket:id="border"></div> in PaginaTestBorder.html > >> > >> -igor > >> > >> On Fri, Jul 17, 2009 at 1:30 PM, Fernando > >> Wermus<fernando.wer...@gmail.com> wrote: > >> > >>> What am I doing wrong in this very simple example? > >>> > >>> > >>> public class PaginaTestBorder extends AuthenticatedWebPage{ > >>> public PaginaTestBorder(){ > >>> add(new EmptyPanel("tabs")); > >>> MyBorder border = new MyBorder("border"); > >>> border.add(new Label("label", "I am the label")); > >>> add(border); > >>> } > >>> } > >>> > >>> > >>> MyBorder.html > >>> <div> > >>> Everything outside of the <wicket:border> tags will be ignored. > >>> Might be handy as preview code. > >>> <wicket:border> > >>> before the border contents <br /> > >>> <wicket:body/> > >>> <br />after the border contents <br /> > >>> </wicket:border> > >>> </div> > >>> > >>> > >>> > >>> class MyBorder extends Border > >>> { > >>> > >>> public MyBorder(String id) > >>> { > >>> super(id); > >>> } > >>> } > >>> > >>> WicketMessage: The component(s) below failed to render. A common > >>> problem is that you have added a component in code but forgot to > >>> reference it in the markup (thus the component will never be > >>> rendered). > >>> > >>> 1. [MarkupContainer [Component id = border]] > >>> 2. [MarkupContainer [Component id = _body]] > >>> 3. [Component id = label] > >>> > >>> Root cause: > >>> > >>> org.apache.wicket.WicketRuntimeException: The component(s) below > >>> failed to render. A common problem is that you have added a component > >>> in code but forgot to reference it in the markup (thus the component > >>> will never be rendered). > >>> > >>> 1. [MarkupContainer [Component id = border]] > >>> 2. [MarkupContainer [Component id = _body]] > >>> 3. [Component id = label] > >>> > >>> > >>> > >>> > >>> > >>> -- > >>> Fernando Wermus. > >>> > >>> www.linkedin.com/in/fernandowermus > >>> > >>> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > >> > > > > > > > > -- > Jason Lea > > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.409 / Virus Database: 270.13.76/2342 - Release Date: 09/03/09 > 18:05:00 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org