Ability to separate keys from values in the select box and ability to translate the values

Ability to separate keys from values in the select box and translate the values

From DMS 2.5.x The method addSelectBoxField of the class org.exoplatform.ecm.webui.form.UIDialogForm support i-18n with format options=label1::value1,label2::value2,label3::value3

To do this, do the followings:

  • Go to ECM Administration-> Manage Template
  • Click the Edit icon on a NodeType using addSelectBoxField method (e.g: Article)
  • Select the Dialog tab and make change like
String[] fieldBureaux = ["jcrPath=/node/exo:summary", "multiValues=true", "validate=empty", 
  "Tous bureaux", 
  "options=Tousbureaux::tous,Arts::arts,Autoformation::autoformation,droiteco::droiteco,        
  histoiregeo::histoiregeo,Information::infogen,litt::litt,
  Musiques::musique,Philoreligions::philo,Presse::presse,Sciencesettechniques::sciences"];
  uicomponent.addSelectBoxField("bureaux", fieldBureaux);

You must be added to the dedicated resource bundle (ie portal/WEB-INF/classes/locale/ecm/dialogs_xx.xml) with following XML tags

<Tousbureaux>Tous bureaux</Tousbureaux> 
<Arts>Arts</Arts> 
<Autoformation>Autoformation</Autoformation>
<droiteco>Droit économie</droiteco>
<histoiregeo>Histoire géographie</histoiregeo>
<Information>Information générale</Information>
<litt>Littératures</litt>
<Musiques>Musiques</Musiques>
<Philoreligions>Philo religions</Philoreligions>
<Presse>Presse</Presse>
<Sciencesettechniques>Sciences et techniques</Sciencesettechniques>
<Presse>Presse</Presse>
  • Go to File Explorer, open the form to create document
  • Select Article template. You will see the select box has changed
article.jpg

Tags:
Created by Hanh Ly on 09/04/2009
Last modified by hoa vu on 04/27/2010

Products

generated on Fri Jul 30 19:08:09 UTC 2010

eXo Optional Modules

eXo Core Foundations


Copyright (c) 2000-2010. All Rights Reserved - eXo platform SAS
2.4.30451