4 Replies Latest reply on Sep 12, 2010 11:41 PM by Muneeswaran Balasubramanian

    How to display built-in error and warning messages in jsf?

    Muneeswaran Balasubramanian Newbie

      Hi to all,

       

                 I am newbie to JSF.I wants to display the built-in error messages in my jsf page.How can i achieve that?

      Please help me.

      Thanks in advance.

        • 1. Re: How to display built-in error and warning messages in jsf?
          Stan Silvert Master

          Hi,

           

          I'm not really sure what you mean.  If you are just talking about error messages in general you should look at a JSF tutuorial that covers the <h:message> and <h:messages> tags.  Here is one, but there are many.

           

          Stan

          • 2. Re: How to display built-in error and warning messages in jsf?
            Muneeswaran Balasubramanian Newbie

            HI Silvert,

                      Thanks for your reply.

             

            I have some knowledge about <h:message> and <h:messages>.But i needto display the built-in error and warning messages.

             

            At the time of run my code,which has the both tags.It display some warnig message in my console that is,Some messages are enqued but not displayed.I want to display that kind of messages.Please help me.

             

             

                                                      Thanks in advance.

            • 3. Re: How to display built-in error and warning messages in jsf?
              Stan Silvert Master

              I still don't understand.  Can you give an example of the kind of message you want to display?

              • 4. Re: How to display built-in error and warning messages in jsf?
                Muneeswaran Balasubramanian Newbie

                Hi Silvert,

                 

                         When i try to run the code  i got the error message in my glashfish server log,

                log4j:WARN No appenders could be found for logger (org.ajax4jsf.application.AjaxStateManager).
                log4j:WARN Please initialize the log4j system properly.
                sourceId=message[severity=(ERROR 2), summary=(), detail=()];|WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
                sourceId=message[severity=(ERROR 2), summary=(), detail=()]
                sourceId=message[severity=(ERROR 2), summary=(), detail=()];|WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
                sourceId=message[severity=(ERROR 2), summary=(), detail=()]
                sourceId=message[severity=(ERROR 2), summary=(), detail=()];|WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
                sourceId=message[severity=(ERROR 2), summary=(), detail=()]
                sourceId=message[severity=(ERROR 2), summary=(), detail=()];|WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
                sourceId=message[severity=(ERROR 2), summary=(), detail=()]
                sourceId=deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField[severity=(ERROR 2), summary=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.), detail=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.)];|WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
                sourceId=deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField[severity=(ERROR 2), summary=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.), detail=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.)]
                sourceId=deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField[severity=(ERROR 2), summary=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.), detail=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.)];|WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.

                sourceId=deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField[severity=(ERROR 2), summary=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.), detail=(deliveryOrderSubview:deliveryOrderForm:deliveryOrderStatusTable:0:deliveredQuantityField: '3e2' must be a number.)]

                I wants to display the enqued message in my page.How can i achieve that.Please help me.