1 Reply Latest reply on Aug 31, 2008 11:12 AM by he youlin

    2.1.0.BETA1: FacesMessages no longer work without message bundle?

    Vladimir Kovalyuk Apprentice

      In Beta1 FacesMessages does nothing if add() method is called:



         public void add(Severity severity, String messageTemplate, Object... params)
         {
            add(severity, null, null, messageTemplate, null, params);
         }



      The second parameter is null and the following code


         public void add(Severity severity, String key, String detailKey, String messageTemplate, String messageDetailTemplate, final Object... params)
         {
            if (!Strings.isEmpty(key))
            {
               final StatusMessage message = new StatusMessage(severity, key, detailKey, messageTemplate, messageDetailTemplate);
               if (!Strings.isEmpty(message.getSummary()))
               {
                  messages.add(message);
                  getTasks().add(
                        new Runnable() 
                        {
                           public void run() 
                           {
                               message.interpolate(params);
                           }
                        }
                  );
               }
            }
         }



      does not handle null message key.