I guess there are really two questions here.
First, I wanted to create an empty component (more about why below) and
did what I thought was reasonable:
add(new Component("navigator") {
public void onRender() {}
});
but I get a wicket.markup.MarkupException:
Markup element at index 33 failed to advance the markup stream
So obviously I need to do more inside onRender than simply return. What
do I need to do? The Javadocs don't say. I would like to know this
even if there is an answer to my second question below that obviates the
need in this particular case: I'm trying to learn at least a little
about how Wicket works.
Second, is there a simple way to hide the PagingNavigator when there is
only one page of results? Most often for my application, there will be
only a single page, but there is no real limit to the number of possible
entries, so I do want it paged. I was hoping to hide the Navigator
unless it was required. That was why I wanted an empty component. I
tried to do this:
if (myList.size() > getItemsPerPage()) {
add(new PagingNavigator("navigator", listView));
} else {
add(new Component("navigator") {
public void onRender() {}
});
}
and that is where I ran into the problem above. Is there a simpler way
to do this?
Thanks,
-- Scott Sauyet
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user