[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Want to exchange client literal... - How to do  XML
Forum Index -> Development
Author Message

Power User

Joined: 21/11/2007 12:23:06
Messages: 5507

(from mail conversation)

Certain literals that show up in the browser client are read from server-side literal files.

. the name of the days in the caldendar component
. the messages if the user does not input a correct e.g. int-value

In general all these literals are part of ".xml" files. Look into the WEB-INF/lib/eclntjfserver-xxx.jar:


If you want to introduce a new language to the existing one: add a language_xx.xml file into your webcontent and it will be used. And then...: tell us about and send the file so that we can add to the standard! ;-)

What to do if there is already a language definition, but you do not like the text?

In this case there is an interface:

 package org.eclnt.jsfserver.util;
 public interface IClientI18NLiteralsUpdate
     public void updateLiteralInfo(Map<String, LanguageInfo> data);

You may implement this interface and register your implementation in system.xml:

         clientliteralsupdateclass="...class implementing IClient18NLiteralsUpdate..."

In the interface per language (key of the map) a LanguageInfo instance is kept:

     public static class LanguageInfo
         List<String> m_monthNames = new ArrayList<String>();
         List<String> m_weekdayNamesShort = new ArrayList<String>();
         Map<String,String> m_literals = new HashMap<String,String>();
         public List<String> getMonthNames() { return m_monthNames; }
         public List<String> getWeekdayNamesShort() { return m_weekdayNamesShort; }
         public Map<String, String> getLiterals() { return m_literals; }

You may access and change the corresponding String-lists and -maps by your code and by the update the client side literals.

Björn Müller, CaptainCasa GmbH
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team