But we have to take internationalization into account... Just having a
string label is not sufficient.

Martijn

On 10/25/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
i already said this from wicket day 1.
I still don't like that you have to do this:

<a href="#" wicket:id="link"><span wicket:id="label"></span></a>

i really don't like that. It clutters markup with the span and you have to
make 2 components in wicket
And i think that the label part is a text property of the anchor. It is not
standalone.
(see it as the display value of the action value == the href)

maybe how FormComponents work:

public IModel getLabel()
{
        return this.labelModel;
}

but we could say, don't make another member variable to reduce the state,
then a String getLabel() would be fine.

And one method doesnt really clutter api, maybe a nice thing would be then
you could
set the label model through the constructor (just like formcomponent should
do.... but thats just to much work)
so that it is really visible...

johan



On 10/25/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> On 10/25/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> > Still don't like it. It adds yet another way to work with links, and
> > requires subclassing to do so. What is more convenient?
> >
> > new Label(new BookmarkablePageLink(this, "link"), "label", "Text");
> >
> > or
> >
> > new BookmarkablePageLink(this, "link") {
> >     protected String getLabel() {
> >         return "Text";
> >     }
> > };
>
> I would find the latter more convenient as there is no label in the
> markup, and it's also more efficient as it saves having an extra
> component for each link.
>
> 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>

Reply via email to