Yes, the attribute thing doesn't realy look wicket like, that is true.
But I still think that some kind of i18n (message) retrieval e.g. for
button texts can be improved. A button is something I would like to be
easily modifyable especially in multi-language application. Of course
you can do it already, just create a new component derived from Button
and attach an attribute modifier. Easy. But isn't it such a genereal
requirement that it does make sense to implement such functionality in
wickets core button component? Something like: Default is given in
html markup. Search for <id>.<attributeName>=text and if found,
replace the default.
Juergen
On 11/11/05, Andrew Berman <[EMAIL PROTECTED]> wrote:
> Jeurgen,
>
> I think the attribute feature should be removed. I think it is just
> un-Wicket-like, and I think others agree as I read form the emails in this
> thread. As I mentioned before I think when it comes to attributes, it is
> best to just do it from within the component manually instead of the way you
> have it.
>
> Thoughts?
>
> --Andrew
>
>
> On 11/10/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> >
> > First draft version available in CVS HEAD
> >
> > Juergen
> >
> > On 11/10/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> > > I've implemented it last night. Was fairly easy. I'll commt it tonight.
> > >
> > > <wicket:message key="my-key">Default value</wicket:message>
> > >
> > > <input wicket:message="attrName=my-key" type=.../>
> > >
> > > As wicket core is very much pluggable, it can easily be added / removed.
> > >
> > > Juergen
> > >
> > > On 11/9/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > > +1
> > > >
> > > > -Igor
> > > >
> > > >
> > > > On 11/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > > I think <wicket:message key=".."/> would fit well with our other
> wicket
> > > > tags, e.g <wicket:panel>.
> > > > >
> > > > > IMHO such an addition would be very useful.
> > > > >
> > > > > Sven
> > > > >
> > > > > >
> > > > > >You mean for tag text, correct? <span wicket:message="
> hello.message" />
> > > > > >
> > > > > >What do you think about <wicket:message key=".."/>. Than it is
> clear
> > > > > >that the whole label is wicket specific,
> > > > > >
> > > > > ><span wicket:message="key"> is a bit dangerous because how would we
> > > > > >handle <span wicket:id="myLabel" wicket:message="key">?
> > > > > >
> > > > > >Juergen
> > > > > >
> > > > > >On 11/9/05, Dorel Vaida <[EMAIL PROTECTED] > wrote:
> > > > > >> Juergen Donnerstag wrote:
> > > > > >>
> > > > > >> >I'm all for making things easier for the user.
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >> >>Perhaps Wicket could have something like this:
> > > > > >> >><span wicket:id="message:myLabelHere"></span>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >
> > > > > >> >I'm not sure this makes sense. wicket:id is not a text to be
> displayed
> > > > > >> >anywhere. It is a name which identifies a component. It
> definitely
> > > > > >> >won't work.
> > > > > >> >
> > > > > >> >
> > > > > >> Actually, maybe this is not the solution but a way to specify
> i18n
> > > > > >> message keys directly in the html through a wicket tag would be
> VERY
> > > > > >> handy. Now, in a project I'm working on, for a i18n input form,
> half
> > > > of
> > > > > >> the form elements are i18n labels that I add to the form in java
> code.
> > > > > >> Instead of add(new I18nLabel("lbl", "hello.mesage")) and <span
> > > > > >> wicket:id="lbl" /> it would be more handy to have 'something
> like'
> > > > <span
> > > > > >> wicket:message=" hello.message" ></span> or <wicket:message
> > > > > >> key="hello.message" />, w/o poluting java code with i18n keys if
> it's
> > > > > >> not necessary (like when you need to compose complex i18n
> messages
> > > > > >> which would be done from the code).
> > > > > >>
> > > > > >> Just a thought :-) (or maybe I am too intoxicated with
> > > > > >> Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you
> know.)
> > > > > >>
> > > > > >> >
> > > > > >> >
> > > > > >> >>Even better would be that it would recognize the message:label
> > > > anywhere
> > > > > >in
> > > > > >> >>the HTML. So for example, you could have:
> > > > > >> >><input type="submit" value="message: label.submit " />
> > > > > >> >>
> > > > > >> >>
> > > > > >> >
> > > > > >> >That I think is possible. Acutally you can do it today already
> without
> > > > > >> >any changes to the core. You need to develop a IMarkupFilter and
> > > > > >> >append it to the list of existing ones invoked by MarkupFilter.
> > > > > >> >
> > > > > >> >However you won't be able to handle "message: ...." within a tag
> body;
> > > > > >> >only tag attributes. How does Tapestry do it for body text?
> > > > > >> >
> > > > > >> >An other option would be to run a kind of text based (not xml
> based)
> > > > > >> >pre-processor (like we do merging of inherited markup) prior to
> adding
> > > > > >> >the markup to the cache.
> > > > > >> >
> > > > > >> >How likely is it that you'll find "message:" and it is not
> intended to
> > > > > >> >be a i18n text? How to escape it?
> > > > > >> >
> > > > > >> >Lets say your message must contain a reference some other data,
> e.g.
> > > > > >> >"...${price}...". That won't be possible either. Only simple
> text. As
> > > > > >> >AttributeModifier is already able to handle it, "message:.."
> would be
> > > > > >> >for easy and straight forward replacements only, and
> AttributeModifer
> > > > > >> >to cover everything else.
> > > > > >> >
> > > > > >> >Ah, and of course you loose preview capabilities, as the
> designer
> > > > > >> >won't the real message, he'd see "message:..." only.
> > > > > >> >
> > > > > >> >And it might not the perfekt solution for high-speed up, because
> of
> > > > > >> >the (little) performance penalties involved. For high-speed up
> you can
> > > > > >> >still have myPage_en.html; myPage_nl.html etc may which as well
> cover
> > > > > >> >minor changes in the layout due to labels being of differents
> length;
> > > > > >> >right-to-left languages etc.
> > > > > >> >
> > > > > >> >Juergen
> > > > > >> >
> > > > > >> >On 11/8/05, Andrew Berman < [EMAIL PROTECTED]> wrote:
> > > > > >> >
> > > > > >> >
> > > > > >> >>In my app I never hard-code text so I'm constantly adding
> Labels to
> > > > my
> > > > > >> >>pages. I was wondering if it would make sense to have a
> shortcut,
> > > > > >similar
> > > > > >> >>to how Tapestry does it, for dsplaying localization messages.
> In
> > > > > >Tapestry,
> > > > > >> >>you can do this: title="message:page-title", where page-title
> is the
> > > > > >lookup
> > > > > >> >>into the property file.
> > > > > >> >>
> > > > > >> >>Perhaps Wicket could have something like this:
> > > > > >> >><span wicket:id="message:myLabelHere"></span>
> > > > > >> >>
> > > > > >> >>Even better would be that it would recognize the message:label
> > > > anywhere
> > > > > >in
> > > > > >> >>the HTML. So for example, you could have:
> > > > > >> >><input type="submit" value="message: label.submit" />
> > > > > >> >>
> > > > > >> >>Thoughts?
> > > > > >> >>
> > > > > >> >>--Andrew
> > > > > >> >>
> > > > > >> >>
> > > > > >> >>
> > > > > >> >
> > > > > >> >
> > > > > >>
> > > >
> >-------------------------------------------------------
> > > > > >> >SF.Net email is sponsored by:
> > > > > >> >Tame your development challenges with Apache's Geronimo App
> Server.
> > > > > >Download
> > > > > >> >it for free - -and be entered to win a 42" plasma tv or your
> very own
> > > > > >> >Sony(tm)PSP. Click here to play:
> > > > http://sourceforge.net/geronimo.php
> > > > > >> >_______________________________________________
> > > > > >> >Wicket-user mailing list
> > > > > >> > [email protected]
> > > > > >> >
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >> >
> > > > > >> >
> > > > > >> >
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >>
> > > >
> -------------------------------------------------------
> > > > > >> SF.Net email is sponsored by:
> > > > > >> Tame your development challenges with Apache's Geronimo App
> Server.
> > > > > >Download
> > > > > >> it for free - -and be entered to win a 42" plasma tv or your very
> own
> > > > > >> Sony(tm)PSP. Click here to play:
> > > > http://sourceforge.net/geronimo.php
> > > > > >> _______________________________________________
> > > > > >> Wicket-user mailing list
> > > > > >> [email protected]
> > > > > >>
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> >-------------------------------------------------------
> > > > > > SF.Net email is sponsored by:
> > > > > >Tame your development challenges with Apache's Geronimo App Server.
> > > > Download
> > > > > >it for free - -and be entered to win a 42" plasma tv or your very
> own
> > > > > >Sony(tm)PSP. Click here to play:
> > > > http://sourceforge.net/geronimo.php
> > > > > >_______________________________________________
> > > > > >Wicket-user mailing list
> > > > > > [email protected]
> > > > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > > >
> > > > >
> -------------------------------------------------------
> > > > > SF.Net email is sponsored by:
> > > > > Tame your development challenges with Apache's Geronimo App Server.
> > > > Download
> > > > > it for free - -and be entered to win a 42" plasma tv or your very
> own
> > > > > Sony(tm)PSP. Click here to play:
> > > > http://sourceforge.net/geronimo.php
> > > > > _______________________________________________
> > > > > Wicket-user mailing list
> > > > > [email protected]
> > > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > >
> > > >
> > >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server.
> Download
> > it for free - -and be entered to win a 42" plasma tv or your very own
> > Sony(tm)PSP. Click here to play:
> http://sourceforge.net/geronimo.php
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user