3 Replies Latest reply on May 22, 2006 11:12 AM by Maximiliano Carrizo

    Uninterpretable JSF Warning: [HtmlRendererUtils] There shoul

    Sven Linstaedt Newbie

      I am getting the following warning from myfaces using JBoss 4.0.4cr2:

      [HtmlRendererUtils] There should always be a submitted value for an input if it is rendered, its form is submitted, and it is not disabled or read-only.

      Although this is a surpringly detailed warning message, i cant figure out, why i get it. The depend JSP is quite simple and uses a two staged mechanism to simulate a editable <h:selectOneMenu>.

      In the beginning, ams.initialStates is NULL, so the selectOneMenu is not displayed. After suppliing ams.agent_name and ams.adf and NO ams.state the backing bean tests with the "ams.createAgent" action, if there is a list of ams.initialStates available.
      If so, the page is redisplayed with the list ams.initialStates (id="state1") instead of the inputText (id="state2"). When submitting the form again, myfaces will not set the ams.state, but instead printing the warning mentioned above.

      Forum and Google searches did not report much about the warning message, so I give it shot in here :)

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <f:loadBundle basename="jadex.adapter.j2ee.web.Messages" var="msg" />
       <jsp:include page="includes/header.jsp" />
       <h:panelGrid columns="2" columnClasses="heading, heading">
       <h:graphicImage url="images/ams_new.png" height="48" />
       <h:outputText value="#{msg.ams_new}" />
       <h:panelGrid columns="3">
       <h:outputText value="#{msg.agent_name}" />
       <h:inputText id="agentname" value="#{ams.agentname}" required="true"
       styleClass="agent_new" />
       <h:message for="agentname" styleClass="error" />
       <h:outputText value="#{msg.agent_adf}" />
       <h:inputText id="adf" value="#{ams.adf}" required="true"
       styleClass="agent_new" readonly="#{not empty ams.initialStates}"/>
       <h:message for="adf" styleClass="error" />
       <h:outputText value="#{msg.agent_state}" />
       <h:inputText id="state1" value="#{ams.state}"
       styleClass="agent_new" rendered="#{empty ams.initialStates}" />
       <h:message for="state1" styleClass="error" rendered="#{empty ams.initialStates}"/>
       <h:selectOneMenu id="state2" value="#{ams.state}"
       styleClass="agent_new" rendered="#{not empty ams.initialStates}">
       <f:selectItems value="#{ams.initialStates}" />
       <h:message for="state2" styleClass="error" rendered="#{not empty ams.initialStates}"/>
       <h:outputText value="#{msg.agent_arguments}" />
       <h:inputTextarea id="arguments" value="#{ams.arguments}" styleClass="agent_new" />
       <h:message for="arguments" styleClass="error" />
       <h:commandButton value="#{msg.agent_start}" action="#{ams.createAgent}" />
       <h:messages styleClass="error" layout="list" />
       <jsp:include page="includes/footer.jsp" />