9 Replies Latest reply on Mar 24, 2009 1:57 PM by Kevin Heneghan

    Issue with inputText in footer facet for rich:dataTable

    Kevin Heneghan Newbie

      I was using the h:dataTable and using the footer to hold the user input fields, inputText, selectOneMenu, and booleanCheckBox. The user filled in the inputs, used a command button to submit the page and a new row was added to the dataTable. It all worked fine until, I switch to rich:dataTable.

      Now I get the following warning when the add button is pressed

      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.

      here is the slimmed down version of the jsp

       <rich:panel header="#{msg.labelForestDomains}" bodyClass="body3" >
      
       <rich:dataTable id="domainTable" value="#{AdDomainPage.adDomainList}" var="domain" width="98%"
       border="0" cellpadding="4" cellspacing="2"
       headerClass="tableHeader" styleClass="group"
       columnClasses="itemHeader" rowClasses="rowOdd, RowEven">
      
       <rich:column id="col-1">
       <f:facet name="header">
       <h:outputText value="Domain Type"/>
       </f:facet>
       <h:outputText id="domainType" value="#{domain.domainType}"/>
       <f:facet name="footer">
       <h:selectOneMenu id="type1"
       value="#{AdDomainPage.type.value}"
       binding="#{AdDomainPage.type.component}"
       validator="#{AdDomainPage.type.validate}"
       style="width: 90px;">
       <f:selectItems value="#{AdDomainPage.domainTypeChoices}"/>
       </h:selectOneMenu>
       </f:facet>
       </rich:column>
       <rich:column id="col-2">
       <f:facet name="header">
       <h:outputText value="Domain Name"/>
       </f:facet>
       <h:outputText id="domainName" value="#{domain.name}"/>
       <f:facet name="footer">
       <h:inputText id="name"
       value="#{AdDomainPage.name.value}"
       binding="#{AdDomainPage.name.component}"
       validator="#{AdDomainPage.name.validate}"
       maxlength="64" size="32"/>
       </f:facet>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value=" "/>
       </f:facet>
      
       <h:commandButton id="selectAdDomain"
       image="#{Msg.removeDownButtonImage}"
       value="#{domain.key}"
       action="editRule"
       actionListener="#{AdDomainPage.selectAdDomain}"
       alt="#{Msg.removeButtonAlt}"
       onmouseover="src='/ac#{Msg.removeDownButtonImage_ro}'"
       onmouseout="src='/ac#{Msg.removeDownButtonImage}'">
       <a4j:support event="onclick" reRender="domainTable"/>
       </h:commandButton>
       <f:facet name="footer">
       <h:commandButton id="addAdDomain"
       action="#{AdDomainPage.addAdDomain}"
       image="#{Msg.addRowButtonImage}"
       onmouseover="src='/ac#{Msg.addRowButtonImage_ro}'"
       onmouseout="src='/ac#{Msg.addRowButtonImage}'"
       alt="#{Msg.addRowButtonAlt}"/>
       </f:facet>
       </rich:column>
       </rich:dataTable>
       </richPanel>