On 5/4/06, Ralf Ebert <[EMAIL PROTECTED]> wrote:
Hi Juergen,
> please see WicketMessageTagHandler.java. It is experimental only and
> disabled by default. Reason: it is realy ugly to have something like
> wicket:example="tag=key". AttributeModifier are much more convinent
> and far less ugly, IMO.
if you have a page with like, say, 20 labels with static text (like
you have sometimes in complex forms for explaining things) I don't see
something to win by adding AttributeModifiers to the component tree. I
see localization of static text as "markup issue" because there is
almost no logic to define there. The format you described is rather
ugly, that's right: What about:
<div wicket:message="blaLabel">bla</div> (if you want to go the
message as text between the tags)
this is <wicket:message value="xxx">default</wicket:message> and
already available.
<input type="submit" wicket:message:value="Do something"/> (for
localizing the attribute value, probably the second : is not valid xml
any more, but another separation char like _ or maybe no separation
char at all could be used)
It is all not realy nice, isn't it? That is what we struggled with. We
didn't find a syntax which we realy liked and which is standards
compliant (e.g. XML namespace, schema).
This would be very helpful for quick & easy localization of static
content in pages, something that's missing at the moment from my point
of view. Tell me what you think, if I have time I would like to
implement this and contribute it...
your help is very much appreciated but the syntax should be right.
> That is default. Localizer implements a search hierarchy up the
> component tree. You only need one properties files per language per
> Panel which contains X number of component. Thinking ... That is not
> your question, isn't it? Like Application.properties is the last
> resort for all messages, you ask for one per java package, right? So,
> in addition to the my.pkg.MyPanel.properties it should look in
> my/pkg/Wicket.properties as well (may be Wicket.properties is not the
> best name).
That's what I want to do and it would be a nice feature if such a
lookup strategy could be added by just setting an option and defining
a name for the property file. I tried to do it quick myself but
stopped after finding out that the property file name is quite tightly
coupled to some class name for the moment...
It is fairly easy to add. Please see Settings.addStringResourceLoader,
Application.getResourceStreamLocator and
CompoundResourceStreamLocator.java
Let me know if you need any more help
Juergen
Regards,
Ralf
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user