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" />
  | 
  | <f:view>
  |     <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>
  |     
  |     <h:form>
  |             <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:selectOneMenu>
  |                     <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:panelGrid>
  |             <h:commandButton value="#{msg.agent_start}" 
action="#{ams.createAgent}" />
  |     </h:form>
  |     <h:messages styleClass="error" layout="list" />
  |     
  |     <jsp:include page="includes/footer.jsp" />
  | </f:view>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944080#3944080

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944080


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to