> Somewhere I have to start naming these intermediate objects; the end of
> my statements are starting to look like Lisp code!  :-)

Of course, you don't *have* to use annonymous classes. Make a reusable
class, and see how much more readable your code will be :)

> 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.

Just looking at the code can do wonders.

method getURL in wicket.markup.html.link.Link is called in
onComponentTag for getting the url that should be used for rendering
the link (e.g. when it is coupled to an <a tag, it is put in the href
attribute). It is deliberately overridable for situations like ours.

The Component.urlFor(xx) methods call RequestCycle.urlFor(xx) which
find the proper IRequestCodingStrategy instance and call encode on
them. What that all does is calculating the proper urls for callbacks
to components, bookmarkable pages, resources or whatever Wicket
IRequestTarget  it might be.

Eelco


_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to