0 Replies Latest reply on Aug 27, 2009 11:53 AM by Jens Weintraut

    facesMessages only works after login?

    Jens Weintraut Apprentice

      Hi guys,


      I've a strange problem with facesMessages. In order to use my application users have to log in with their credentials. As soon as the user is logged in, an ICEfaces navigation menu is created in a backing bean using facesMessages. Some other parts also use facesMessages to get i18ned messages. And it works fine.


      There is one single page which can be used without logging in. It's a stupid page to display the users an entity by passing the ID of the entity as a GET parameter in the URL. If the user passes an invalid ID, a backing bean uses facesMessages to tell the user what went wrong. This also works fine.


      The problem now is that there is an order in which the pages have to be used. If the user logs in, logs out and then uses the other page to display some entity, it works.
      But if the user uses this you-don't-need-to-log-in page first and passes an invalid id, there is only the message key displayed instead of the message itself. And this can't be changed from then one. I. e. if the user now logs in - after he used this page with an invalid id - the navigation menus also only display the message keys. I also logged in using another browser at this point to ensure that it doesn't have to do with the client. But it seems that facesMessages keeps corrupted once I used the pages in the wrong order.
      This applies on every message retrieved by facesMessages. The strings in the .xhtml files which are retrieved by the JSF message bundle still work.


      Before I forget to mention it: I use Seam 2.1.1.GA, ICEfaces 1.8.1 and JBoss AS 5.1.GA.


      Thanks in advance
      Jens