0

Core Tag "l2" usage

asked 2009-11-10 07:59:38 +0800

aros54 gravatar image aros54
66

In order to get internationalized values from properties files I'm using often the core tag "l" on my zul files.
Example: <label value="${c:l('global.username')}:"/>
Looking inside the code I found the tag "l2" that, as far as I could understand, should behave as Labels.getLabel(String, Object[]) does.
However I couldn't figure out which is the correct syntax to use this tag.
I suppose it should be somenthing like ... value="${c:l2('labelName', ???)}", but i don't know what can replace the ???.
Is it possible to have a usage sample for this tag?

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2009-11-10 09:23:12 +0800

aros54 gravatar image aros54
66

I got this solution:
<zscript>
Object[] parms = new Oblect[] {value1, valuen};
</zscript>
...
<label value="${c:l2('global.username', parms)}:"/>

This soluton is not fully satisfying my requerements because I would like to enter the parms via EL (such as ${...}).
Any hint?

link publish delete flag offensive edit

answered 2009-11-16 20:59:57 +0800

PeterKuo gravatar image PeterKuo
481 2

Since spec of EL in ZK follows EL in jsp.
I don't think it support the usage you want.

link publish delete flag offensive edit

answered 2011-01-13 14:05:29 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

I have added a feature request https://sourceforge.net/tracker/?func=detail&aid=3157608&group_id=152762&atid=785194 to change the l2 tag.

link publish delete flag offensive edit

answered 2011-01-14 09:38:53 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

nice =)

link publish delete flag offensive edit

answered 2015-04-16 11:40:44 +0800

WilliamB gravatar image WilliamB
1609 1 6

It was closed ... Got the same issue, i would like to make this work :

${c:l2('home.message.format', ${vm.params})}

Where VM is my ViewModel reference and params has a getter that returns a String[].

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-11-10 07:59:38 +0800

Seen: 681 times

Last updated: Apr 16 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More