But as you have proposed it, Korbinians example would look like:
add(new BookmarkablePageLink("Link1", Page1.class) {
protected String getLabel() {
return "Blabla";
}
});
add(new BookmarkablePageLink("Link2", Page2.class) {
protected String getLabel() {
return "Blabladsafa";
}
});
add(new BookmarkablePageLink("Link3", Page3.class) {
protected String getLabel() {
return "afafafaf";
}
});
add(new BookmarkablePageLink("Link4", Page4.class) {
protected String getLabel() {
return "awer342";
}
});
Which is in my view cluttered beyond recognition. Again, it is trivial
to add to your own application using the technique you prefer: trading
session size versus lazy evaluation.
I think
- this bloats our api with very small benefit
- makes working with Wicket unnecessary hard
- forces you to subclass
- adds magic to link handling
- doesn't entice users to create their own custom components when
they need to scratch their itch
- it is not necessary as I haven't felt the need for this feature in
over 200+ pages created with thousands of links.
Thus it receives my -1. However voting is on majority.
Martijn
On 10/25/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
On 10/25/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> I hate that I have to call setRequired on form components, yet I don't
> introduce RequirecDropDownChoice, and vote to remove RequiredTextField
>
> probably same for: Component.setResponsePage() vs.
> RequestCycle.get().setResponsePage()
>
> It is bloating our api, and doesn't give anything extra you can't
> already achieve by creating your own, custom component that does
> exactly as you wish. And Wicket is advocating creating custom
> components.
>
> BTW How often do you *really* have to add the label to the link? Only
> once in a menu panel? How often do you just have some text in the
> markup?
>
> What is the benefit of doing so if you can just add a <wicket:message>
> in the markup?
>
> We use links on and around all kinds of stuff, including: <tr>, <td>,
> <div> <span> <img> etc.
>
> Laziness is a bad motivator for expanding an api as has been said time
> and time again on these mailinglists
Sure. My problem with the whole thing is that is has been applied very
selectively. There have been a zillion ajax methods and convenience
classes in the last few months for instance, which weren't extensively
discussed, and thus no-one cried about it.
Is this a really big thing? To Johan, me and some users it is. Does it
have a big impact on the API? No, not like I proposed it, as it is
something you specifically have to look for.
Eelco
--
<a href="http://www.thebeststuffintheworld.com/vote_for/wicket">Vote</a>
for <a href="http://www.thebeststuffintheworld.com/stuff/wicket">Wicket</a>
at the <a href="http://www.thebeststuffintheworld.com/">Best Stuff in
the World!</a>