3
  • server: apache-tomcat-8.0.39
  • os: win 10
  • jsf: 2.2 (Mojarra)
  • java : jre 1.8.0_121
  • IDE : Eclipse Neon2

enter image description here

I can't figure out the cause of the following message:

com.sun.faces.renderkit.RenderKitUtils renderUnhandledMessages INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=input[severity=(ERROR 2), summary=(summary message), detail=(detail message)]

I only use the following two files:

IndexBean.java

    package com.test.jsf.pckg;

    import javax.faces.application.FacesMessage;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.SessionScoped;
    import javax.faces.context.FacesContext;

    @ManagedBean
    @SessionScoped
    public class IndexBean {

        private String outcome = "index";
        private String userInput = "";

        public String getOutcome() {
            return outcome;
        }

        public void setOutcome(String outcome) {
            this.outcome = outcome;
        }

        public String getUserInput() {
            return userInput;
        }

        public void setUserInput(String userInput) {
            this.userInput = userInput;
        }

        public String addFacesMessage() {

            FacesContext.getCurrentInstance().addMessage("input", new FacesMessage(FacesMessage.SEVERITY_ERROR, "summary message", "detail message"));
            return "";
        }

    }

index.xhtml

    <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:c="http://java.sun.com/jsp/jstl/core">

    <h:head>
        <title>JSF2 PanelGrid and PanelGroup</title>

        <style>
    .colStyle {
        background-color: red;
    }

    .rowStyle {
        font-style: italic;
    }

    .captionStyle {
        background-color: aqua;
        font-style: inherit;
        font-weight: bolder;
    }

    .headerStyle {
        background-color: yellow;
        font-style: oblique;
    }
    </style>
    </h:head>

    <h:body>
        <h:form>
            <h1>
                <h:outputText value="panelGrid and panelGroup - Example" />
            </h1>

            <h2>
                <h:outputText value="panelGrid Demo" />
            </h2>

            <h:panelGrid columns="2" border="1" columnClasses="colStyle,colStyle"
                headerClass="headerStyle" captionClass="captionStyle"
                rowClasses="rowStyle">
                <f:facet name="header">
                    <h:outputText value="Header - panelGrid" />
                </f:facet>
                <f:facet name="caption">
                    <h:outputText value="Caption- panelGrid" />
                </f:facet>
                <h:outputText value="1st row / 1st column" />
                <h:outputText value="1st row / 2nd column" />
                <h:outputText value="2nd row / 1st column" />
                <h:outputText value="2nd row / 2nd column" />
                <h:outputText value="3rd row / 1st column" />
                <h:outputText value="3rd row / 2nd column" />
            </h:panelGrid>

            <h2>
                <h:outputText value="panelGroup Demo" />
            </h2>

            <h:panelGroup id="panelGroup" columns="2">
                <h:inputText id="input" value="#{indexBean.userInput}" />
                <h:commandButton value="Submit" action="#{indexBean.addFacesMessage}" />
                <h:message for="input" showDetail="true" showSummary="false"
                    errorStyle="color: red;" />
            </h:panelGroup>

        </h:form>
    </h:body>
    </html>

The message is displayed in the console when I click on the "Submit" button in the panelGroup.

Any information about the root cause would be greatly appreciated.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
BustedSanta
  • 1,368
  • 7
  • 28
  • 55
  • 3 upvotes in 4 hours during the night (in Europe/US) and early morning in the east for a question that has a rather clear/obvious duplicate Remarkable.... – Kukeltje Feb 15 '17 at 09:11
  • @BalusC - Thank you for pointing out the duplicate question. I am new to JSF and the reason why I believed that it was worth posting a new question was because my code doesn't utilize PrimeFaces. Eventually, I figured out the answer based on the suggested duplicate question even though the issue was not identical. My form was missing an id. – BustedSanta Feb 16 '17 at 01:08
  • @Kukeltje - I am not clear how your comment helps improve the quality of the question or the answer. – BustedSanta Feb 16 '17 at 01:09
  • It does not, was not the intention. Just expressing my amazement that while in general a the quickest a question gets 2 or 3 upvotes is over 1 month for a really good fully new question, this one got so many in a couple of 'low usage' hours while at the same time a good identical one already exists – Kukeltje Feb 16 '17 at 07:43

0 Answers0