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