8 Replies Latest reply on Feb 3, 2011 5:14 PM by Sebastian Sachtleben

    Seam Faces 3.0.0.Beta2 Messages NOT displayed

    Craig  Newbie

      Hi I've added faces 3.0.0.Beta2 and international 3.0.0.Alpha3.


      Ive injected the Messages component. 


      The only one in these to jars is org.jboss.seam.international.status.Messages NOT org.jboss.seam.international.display.Messages as per the documentation




      @Inject
      private Messages messages;





      I've added a message as per :


      messages.info("Test");



      This never appears on the screen!  I need to use this module so messages are displayed after redirection.


      I've tried this as a plain WAR and also a WAR within a EAR.  On Jboss 6 M4 and Final


      Has anyone any ideas?


      Thanks


      Craig


        • 1. Re: Seam Faces 3.0.0.Beta2 Messages NOT displayed
          Shane Bryzak Master

          It could be a bug - can you please raise an issue in JIRA?


          http://issues.jboss.org/browse/SEAMFACES

          • 4. Re: Seam Faces 3.0.0.Beta2 Messages NOT displayed
            Craig  Newbie

            Hi,


            This results in the message being lost durring the direct.


            The problem here is when its packaged as an EAR.


            I have just got it to work by exluding the seam faces jars from the WAR and including them in the EAR/lib directory.


            I don't like this as I feel im mixing jars from the WAR to the EAR just to get the WAR to work!!


            This is the only way until its fixed I guess.


            It will also have issues if I deploy another WAR in my EAR that requires a different seam faces version.


            Craig

            • 5. Re: Seam Faces 3.0.0.Beta2 Messages NOT displayed
              Sebastian Sachtleben Novice

              I can confirm it works fine with a simple war...


              Versions: seam-faces-3.0.0.Beta2 and seam-international-3.0.0.Alpha3


              Implementation:


              @Named @Stateful @ConversationScoped
              public class ContactAction {
              
                @Inject Messages messages;
              
                ...
              
                public void send() {
                  messages.error(new DefaultBundleKey("contact.form.error.SendMailFailed"));
                  // TODO: implement email functionality / waiting for seam mail module ...
                }
              
              }



              <h:messages class="message" globalOnly="true" infoClass="infomsg" errorClass="errormsg" warnClass="warnmsg" />



              Seam 3 seems to be a bit buggy with ear deployment I would recommend to stick on war untill final release!

              • 6. Re: Seam Faces 3.0.0.Beta2 Messages NOT displayed
                Jose Freitas Newbie

                I have the same problem as Craig but in a war package.





                Seam Versions is the same as Sebastian: seam-faces-3.0.0.Beta2 and seam-international-3.0.0.Alpha3,
                Jboss as6 final.

                • 7. Re: Seam Faces 3.0.0.Beta2 Messages NOT displayed
                  Adrian Mitev Master

                  +1 for the same problem in war with the same dependency versions.

                  • 8. Re: Seam Faces 3.0.0.Beta2 Messages NOT displayed
                    Sebastian Sachtleben Novice

                    I have added another global message on a different view successfully.


                    You guys should try to change the jsf configuration in web.xml:


                         <!-- FACES CONFIGURATION -->
                       
                         <context-param>
                              <param-name>javax.faces.PROJECT_STAGE</param-name>
                              <param-value>Development</param-value>
                         </context-param>
                         
                         <servlet>
                              <servlet-name>Faces Servlet</servlet-name>
                              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                              <load-on-startup>1</load-on-startup>
                         </servlet>
                         
                         <servlet-mapping>
                              <servlet-name>Faces Servlet</servlet-name>
                              <url-pattern>*.seam</url-pattern>
                         </servlet-mapping>
                         
                         <context-param>
                              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                              <param-value>server</param-value>
                         </context-param>
                    
                         <context-param>
                              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                              <param-value>.xhtml</param-value>
                         </context-param>
                         <context-param>
                              <param-name>facelets.DEVELOPMENT</param-name>
                              <param-value>true</param-value>
                         </context-param>
                         
                         <context-param>
                              <description>
                                Set this flag to true if you want the JavaServer Faces
                                Reference Implementation to validate the XML in your
                                faces-config.xml resources against the DTD. Default
                                value is false.
                            </description>
                              <param-name>com.sun.faces.validateXml</param-name>
                              <param-value>true</param-value>
                         </context-param>



                    Even without h:messages the messages will be display on bottom of the page.