message-loader-class

From Documentation
Revision as of 04:25, 21 February 2019 by Matthieu (talk | contribs)


message-loader-class



Syntax: <message-loader-class>class.qualified.name</message-loader-class>

Specifies an additional message loader class to load extra messages or customize default msgzk or msgzul entries. If the message loader declare a file pattern using wildcard "*", multiple Locale-based files can be defined and will be loaded according to the current user locale.

Example,

lang-addon.xml

<message-loader-class>foo.bar.MyCustomMessageLoader</message-loader-class>

foo.bar.MyCustomMessageLoader.java

public class MyCustomMessageLoader implements MessageLoader {

	@Override
	public void load(StringBuffer out, Execution exec) throws IOException {
		out.append(Devices.loadJavaScript(exec, "~./mycustom-msgzk*.js"));
	}

}

[resources folder]/mycustom-msgzk.js

msgzk.MYCUSTOM='customized';

[resources folder]/mycustom-msgzk_DE.js

msgzk.MYCUSTOM='angepasst';

message-loader-class

[Required]

The message loader class. It must implement org.zkoss.zk.ui.metainfo.MessageLoader The loader .load(StringBuffer out, Execution exec) need to load the additional client-side messages and append them to the output buffer.


Version History

Last Update : 2019/02/21


Version Date Content
     



Last Update : 2019/02/21

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.