Howdy all,

Using a 2 week old Subversion build.

I have a Result object that is stored in a bean and is bound to a h:dataTable component.

My JSP code looks like this:

<h:dataTable value="#{AdminBean.results }" var="emp"
                      headerClass="dataHeader"
                      footerClass="footer"
                      styleClass="punches"
                      rowClasses="one,two"
                      cellpadding="5">
          <h:column>
            <f:facet name="header">
              <h:outputText value="Date In" />
            </f:facet>
            <h:outputText value="#{emp.PINDATE}" rendered="#{not emp.editable}"/>
            <t:inputText rendered="#{emp.editable}" />
          </h:column>
.
.
.
         <h:column>
            <f:facet name="header">
                <h:outputText value="Edit" />
             </f:facet>
             <h:selectBooleanCheckbox value="#{ emp.editable}" >          </h:column>
        </h:dataTable>


Now, when this page is first displayed both the outputText and inputText tags are rendered, when only one or the other should be.  If I select the booleanCheckBox, then the page is submitted and everything looks normal.

Is there someway to set the editable property of a dataTable to a default value? Shouldn't it be non editable by default?

Thanks,
Elam Daly

Reply via email to