myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "darryl hamer (JIRA)" <incubator-...@incubator.apache.org>
Subject [jira] Created: (MYFACES-107) x:datatable submit updates all rows of table with selected value instead of actual row value
Date Tue, 15 Feb 2005 20:16:50 GMT
x:datatable submit updates all rows of table with selected value instead of actual row value
--------------------------------------------------------------------------------------------

         Key: MYFACES-107
         URL: http://issues.apache.org/jira/browse/MYFACES-107
     Project: MyFaces
        Type: Bug
    Versions: 1.0.8 beta    
 Environment: windows2000
    Reporter: darryl hamer


The submit function of the following x:dataTable updates all the editable components with
the current value of the selected row, instead of the actual value from the table row.



          <x:dataTable rows="15" width="300" 
                       value="#{myEmployees.employees}" 
                       sortColumn="#{myEmployees.sort}"
                       sortAscending="#{myEmployees.ascending}"
                       preserveDataModel="true"
                       preserveSort="true"
                       styleClass="tablebg"
                       rowClasses="evenRow, oddRow"
                       var="row">

            <h:column>
              <f:facet name="header">
                  <h:outputText value="select" />                
              </f:facet>
              <h:selectBooleanCheckbox value="#{row.edit}" onclick="submit()"/>
            </h:column>

            <h:column>
              <f:facet name="header">
                <x:commandSortHeader columnName="first_name" arrow="false">
                  <h:outputText value="first name" />                
                </x:commandSortHeader>
              </f:facet>
              <h:inputText value="#{row.first_name}" rendered="#{row.edit}" />
              <h:outputText value="#{row.first_name}" rendered="#{not(row.edit)}"/>
            </h:column>

            <h:column>
              <f:facet name="header">
                <x:commandSortHeader columnName="last_name" arrow="false">
                  <h:outputText value="last name" />                
                </x:commandSortHeader>
              </f:facet>
              <h:outputText value="#{row.last_name}"/>
            </h:column>

            <h:column>
              <f:facet name="header">
                <x:commandSortHeader columnName="email" arrow="false">
                  <h:outputText value="email" />                
                </x:commandSortHeader>
              </f:facet>
              <h:outputText value="#{row.email}"/>
            </h:column>

          </x:dataTable>   

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message