Sure it works, but... if Wicket is going to have ${key}... ${something} in htmls, let's go back to JSP 2.0 and use EL... just a thought



On 5/9/06, Matej Knopp <[EMAIL PROTECTED]> wrote:
So far I can say it works well for me.
The only problematic (or cumbersome) thing was that I had to make my own
  ResourceStreamLocator and ResourceStream to have this done.
Having some kind of preprocessing filters (with methods like

    String processString(String)   or

    InputStream processStream(Input Stream)

would be enough);

-Matej


Johan Compagner wrote:
> That is also a possibilty
> That we pre process the markup even before the markup parser handles it.
> Then we just replace all wicket:i18n:key:XXXXXX (or whatever we call it)
> and then parse the markup.
>
> johan
>
>
> On 5/9/06, *Matej Knopp* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
>     I solved this some time ago with own "preprocessor" that replaces
>     ${key} with the value from property files.
>
>     I know this is not very wicket-like, but the markup looks much simpler
>     with ${key} then with <wicket:message key="key"></wicket:message>
>
>     -Matej
>
>     Igor Vaynberg wrote:
>      > why not? in a preview you would get a button with text
>      > "wicket:i18n:buttons.save"
>      >
>      > thats good for preview since you can see the key!
>      >
>      > -Igor
>      >
>      >
>      > On 5/8/06, * Juergen Donnerstag* <[EMAIL PROTECTED]
>     <mailto: [EMAIL PROTECTED]>
>      > <mailto:[EMAIL PROTECTED]
>     <mailto: [EMAIL PROTECTED]>>> wrote:
>      >
>      >     It will not be previeable any more.
>      >
>      >     Juergen
>      >
>      >     On 5/9/06, Igor Vaynberg < [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>      >     <mailto: [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>>> wrote:
>      >      > why not a format like this
>      >      >
>      >      > <input type="submit" value="wicket:i18n: buttons.save"/>
>      >      >
>      >      > or
>      >      >
>      >      > <input type="submit" value="wi18n: buttons.save"/>
>      >      >
>      >      > -Igor
>      >      >
>      >      >
>      >      >
>      >      > On 5/8/06, Andrew Berman < [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>      >     <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
>      >      > >
>      >      > > Hey Guys,
>      >      > >
>      >      > > I think adding something to support localized attributes
>     would
>      >     be a big
>      >      > plus.  I know that when Wicket added wicket:message it really
>      >     saved a lot of
>      >      > extra Java code on my part.  I think the same thing would
>     happen
>      >     if we came
>      >      > up with something to do it in attributes.  AttributeModifiers
>      >     obviously
>      >      > work, but when you have a lot of things you want to
>     localize on
>      >     the same
>      >      > page it's a lot of extra Java code that needs to be written to
>      >     support this
>      >      > because you need to add the specific Component and add an
>      >     AttributeModifier.
>      >      > >
>      >      > > What about a compromise?  I think the experimental stuff in
>      >      > WicketMessageTagHandler is cumbersome to add to the HTML,
>     so what
>      >     if we
>      >      > created a component whose sole purpose is to add attributes to
>      >     some HTML
>      >      > element.  Or can this already be done like this:
>      >      > >
>      >      > > Java:
>      >      > > add(new WebComponent("imageAlt").add(new
>      >      > AttributeModifier("alt", true, new ResourceModel(" my.key"))));
>      >      > >
>      >      > > HTML:
>      >      > > <img wicket:id="imageAlt" src="" />
>      >      > >
>      >      > > I haven't tested if this works, but if not, maybe some
>     kind of
>      >     Component
>      >      > could be created which allows something like this.  It
>     will allow for
>      >      > multiple attributes to be replaced as well.
>      >      > >
>      >      > > Thoughts?
>      >      > >
>      >      > >
>      >      > > --Andrew
>      >      > >
>      >      > >
>      >      > >
>      >      > > On 5/4/06, Juergen Donnerstag <
>     [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>      >     <mailto: [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>>> wrote:
>      >      > > > On 5/4/06, Ralf Ebert < [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>      >     <mailto:[EMAIL PROTECTED] <mailto: [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 <http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642>
>     < http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642 <http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642 >>
>      >      > > > > _______________________________________________
>      >      > > > > Wicket-user mailing list
>      >      > > > > Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net>
>      >     <mailto: Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net>>
>      >      > > > >
>      >      > 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?cmdlnk&kid0709&bid&3057&dat1642 <http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642 >
>     <http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642 < http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642>>
>      >      > > > _______________________________________________
>      >      > > > Wicket-user mailing list
>      >      > > > Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net >
>      >     <mailto: Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net >>
>      >      > > >
>      >      > 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?cmdlnk&kid0709&bid&3057&dat1642 <http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642 >
>     <
>     http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642 < http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642>>
>      >     _______________________________________________
>      >     Wicket-user mailing list
>      >     Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net>
>      >     <mailto: Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net>>
>      >     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&kid=120709&bid=263057&dat=121642
>     <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
>     _______________________________________________
>     Wicket-user mailing list
>     Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net >
>     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&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4

Reply via email to