3 Replies Latest reply on Nov 29, 2008 2:21 AM by Vitor Souza

    How to pass params to status messages from a resource bundle

    Vitor Souza Newbie

      Hello. This might be a silly question... Sorry if I'm too eager to come to the forums, but I've searched around and I couldn't find an example.

      I have a resource bundle with the following messages:

      userUpdateSucceeded=This user was successfully updated: #{selectedEntity.login}.
      userDeleteSucceeded=These users were successfully deleted: {0}

      Those messages are used in two different methods of the Session Bean, like this:

      statusMessages.add("#{messages['userDeleteSucceeded']}", logins);

      The first one works fine, since the updated user is found in the selectedEntity variable and its property login is correctly print. For the second one, I concatenated the logins of all of the deleted users and wanted to pass as parameter to the message, but it doesn't work. It shows {0} in the screen.

      I have also tried #0 (like with Seam logging), but it also didn't work.

      What am I doing wrong?

      Thanks for any pointers,

      Vitor Souza