Why not use a list view for the comment list? If you want to show a message with "No comments", then:
add(new Label("nocomments", "No comments") { boolean isVisible() { return comments == null || comments.isEmpty();} }); <p wicket:id="comments">this is the listview</p> <p wicket:id="nocomments">this is the no comments label</p> Martijn On 12/27/06, August Detlefsen <[EMAIL PROTECTED]> wrote: > > In my case I have an article that can have zero or more comments attached > to it. I've been getting this error in the case where an article has no > comments. What is the best practice for handling this? > > -August > > > > > Igor Vaynberg wrote: > in myapplication.init() { > getdebugsettings().setcomponentusecheck(false); } > > but you really shouldnt do that, there should be no reason something is in > java but not in markup. there are plenty of ways to handle these cases such > as component visibility/panels/fragments/etc > > -igor > > > > On 12/26/06, August Detlefsen <[EMAIL PROTECTED]> wrote: > > 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). > > > > Is there any way to have wicket simply ignore missing components in the > > markup? For example, if not every page will include every element. > > > > Thanks, > > August > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys - and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > -- > August Detlefsen > CEO/Web Application Architect > CodeMagi, Inc. > 510-368-4489 tel > 510-336-9434 fax > http://www.codemagi.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > -- Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now! http://wicketframework.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user