Hello,

Je tente de récupérer mon texte d'un message bundle en lui passant des valeurs {0} et {1}

Dans le code je le fais de cette manière

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
	/**
         * Gets the libelle of the Jalons
         */
	public String getLibelle() {
		LOG.debug("GET LIBELLE : " + Utils.getMessageResourceString("milestones", jalons.getClef() + ".libelle", new String [] {jalons.getDate(), jalons.getDecision()}, FacesContext.getCurrentInstance().getViewRoot().getLocale()));
		return Utils.getMessageResourceString("milestones", jalons.getClef() + ".libelle", new String [] {jalons.getDate(), jalons.getDecision()}, FacesContext.getCurrentInstance().getViewRoot().getLocale());
	}
Ou la méthode de récupération de la clef du message bundle est la suivante

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
		public static String getMessageResourceString(String bundleName, String key, Object params[],Locale locale){
 
			String text = null;			
			ResourceBundle bundle =	ResourceBundle.getBundle(bundleName, locale, getCurrentClassLoader(params));			
			try{
				text = bundle.getString(key);
			} catch(MissingResourceException e){
				text = "?? key " + key + " not found ??";
			}			
			if(params != null){
				MessageFormat mf = new MessageFormat(text, locale);
				text = mf.format(params, new StringBuffer(), null).toString();
				LOG.debug("getMessageResourceString (WITH PARAM " + text);
			}			
			return text;
		}
Mais lorsque j'affiche le résultat les variables ne sont pas substitués

Une idée ?