0

Visual Editor and i18n

asked 2009-07-22 19:29:58 +0800

sousa1981 gravatar image sousa1981
573 4

I am trying to use MVEL with i18n without success in Visual Editor. It works in browser however the visual editor in eclipse will not render.

The following code work in visual editor zk studio:

<zk>
<grid>
	<rows>
		<row>UserName:<label id="username" /></row>
	</rows>
</grid>
</zk>

But the following code will not work in visual editor zk studio:

<zk>
<grid>
	<rows>
		<row>${Labels.getLabel('index.username')}<label id="username" /></row>
	</rows>
</grid>
</zk>

As you can see using Labels.getLabel is the problem to ZK Studio (Visual Editor).

Thanks in advance

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2009-07-23 11:08:21 +0800

hamroune gravatar image hamroune
60

Hi, Use this tag
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" ?>

and your code:

<zk>
<grid>
<rows>
<row>${c:l(index.username)}<label id="username" /></row>
</rows>
</grid>
</zk>



hamroune

link publish delete flag offensive edit

answered 2009-07-23 12:02:31 +0800

sousa1981 gravatar image sousa1981
573 4

Hi, this is not what I want.

I know that this ${c:l(index.username)} will work, however I want MVEL.

BTW, Thanks

link publish delete flag offensive edit

answered 2009-07-23 15:43:40 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Sousa, have you seen this doc.

link publish delete flag offensive edit

answered 2009-07-23 19:55:50 +0800

sousa1981 gravatar image sousa1981
573 4

@terrytornado: I know how to use MVEL and all other EL.

The fact, due to great performance of MVEL, I work only with MVEL.

The code above work if you run the application, however, the same code is not rendered in Visual Editor (the issue).

Of course before the code you will need

<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" ?>
<?evaluator name="mvel"?

BTW, Thanks

link publish delete flag offensive edit

answered 2009-07-24 01:08:37 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

@sousa,
what is your configuration to make mvel work?
there is a white list in project preference, maybe you should add mvel jar files into this list.
If still not work, then you need to post to feature request. ( VE didn't eat all the ZK configuration in your application)
/Dennis

link publish delete flag offensive edit

answered 2009-07-24 08:13:47 +0800

sousa1981 gravatar image sousa1981
573 4

@Dennis:
Here is an index.zul page which works very well when running application, however VE of ZK Studio will not render the page.

This page works well and is rendered by VE:

<?page id="indexPage" title="BCI - O MEU BANCO" contentType="text/html;charset=UTF-8"?>

<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" ?>
<?evaluator name="mvel"?>

<zk>
	<borderlayout>
		<north size="35%" border="none"></north>
		<west size="40%" border="none"></west>
		<center border="none">
			<window id="loginForm" width="100%" border="normal">
				<grid>
					<rows>
						<row>Username: <textbox id="username" /></row>
						<row>Password: <textbox id="password" type="password" /></row>
						<row spans="2" align="center"><button id="login" label="Login" /></row>			
					</rows>
				</grid>
			</window>
		</center>
		<east size="40%" border="none"></east>
		<south size="35%" border="none"></south>
	</borderlayout>
</zk>

This page works well and is NOT rendered by VE:

<?page id="indexPage" title="BCI - O MEU BANCO" contentType="text/html;charset=UTF-8"?>

<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" ?>
<?evaluator name="mvel"?>

<zk>
	<borderlayout>
		<north size="35%" border="none"></north>
		<west size="40%" border="none"></west>
		<center border="none">
			<window id="loginForm" width="100%" border="normal">
				<grid>
					<rows>
						<row>${Labels.getLabel('index.username')} <textbox id="username" /></row>
						<row>${Labels.getLabel('index.password')} <textbox id="password" type="password" /></row>
						<row spans="2" align="center"><button id="login" label="${Labels.getLabel('index.login')}" /></row>			
					</rows>
				</grid>
			</window>
		</center>
		<east size="40%" border="none"></east>
		<south size="35%" border="none"></south>
	</borderlayout>
</zk>

Of course I have the file "i3-label.properties" and all jars necessary to mvel work.

I will post it to feature request.

Looks like, people use less MVEL, let me blog (it means also an small talk) about it, about the advantages of MVEL instead the old EL.

Regards,

link publish delete flag offensive edit

answered 2009-07-24 08:20:38 +0800

sousa1981 gravatar image sousa1981
573 4

Posted to feature request ID: 2826440 link https://sourceforge.net/tracker/?func=detail&aid=2826440&group_id=225644&atid=1065693

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-07-22 19:29:58 +0800

Seen: 1,130 times

Last updated: Jul 24 '09

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