Eelco Hillenius wrote: > I think it is quite easy? If we implement that feature request it > would be easier as it would be build in. But so many hours in a day... > I actually forgot part of the code: [ ... ]
Okay, now it was easy! [1] Thanks. Here's what I did: contents.add(new PageLink("commentLink", new IPageLink() { public Class getPageIdentity() {return TopicPage.class;} public Page getPage() {return new TopicPage(topic);} }) { protected String getURL() { return urlFor(ILinkListener.class) + "#comments"; } }.add(new Label("commentCount", "" + (topic.postCount() - 1)))); Somewhere I have to start naming these intermediate objects; the end of my statements are starting to look like Lisp code! :-) It works, and I guess that's what's most important, but I'm still not clear on what I actually did. Okay, so it's just one thing I'm not quite clear on: urlFor(Class listenerInterface) is still a mystery to me. I'm not making a lot of sense out of any of the Javadocs, and I think it's because I haven't done Wicket in a while now. I'll get it eventually. Thanks for your help, -- Scott [1] "Now it's easy" reminds me of the joke from my math grad school days: A professor is lecturing on his esoteric field of mathematics and says at one point, "It is obvious that" a certain proposition is true. A student calls him on it, asking, "Why is that true?" The professor stops, scratches his head, ponders for a moment, then sits down staring at the blackboard mumbling to himself. He stays there as the class ends, stroking his beard and furiously scribbling notes. When the class meets again, he excitedly spends the entire hour presenting an intricate proof of the proposition. As the class ends, he can clearly be heard saying to himself, "See? I KNEW it was obvious!" _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user