Page 1 of 1

Datatable Basic Selection not working

Posted: 25 Feb 2013, 14:20
by Salim
Hi,
I'm trying to demonstrate the basic selection of a datatable but it doesnt work, the dialog is shown succesfully, but the selection Item is not populated in the dialog?
JSF 2.1/Tomcat 7.0.35

Code: Select all

            <f:view>
                <h:form id="form"> 
                    <p:dataTable  id="table" value="#{deuxNotes.allDn}" var="item" rowKey="#{item.idEtudiant}"  
                                  selection="#{deuxNotes.selectedDeuxNotesEntity}" selectionMode="single">
                        <p:column headerText="Centre"> #{item.centre}</p:column>
                        <p:column headerText="IdEtudiant"> #{item.idEtudiant}</p:column>
                        <p:column headerText="Prof1"> #{item.prof1}</p:column>
                        <p:column headerText="Note1"> 
                            <h:outputText class="boutonA" value="#{item.note1}" />
                        </p:column>
                        <p:column headerText="Prof2"> #{item.prof2}</p:column>
                        <p:column headerText="Note2"> 
                            <h:outputText class="boutonA" value="#{item.note2}" />
                        </p:column>
                        <p:column headerText="Diff"> #{item.diff}</p:column>
                        <p:column headerText="Prof3"> #{item.prof3}</p:column>
                        <p:column headerText="Note3"> 
                            <h:outputText class="boutonA" value="#{item.note3}" />
                        </p:column>
                       <p:column headerText="Note Final"> 
                            <h:outputText class="boutonA" value="#{item.notef}" />
                        </p:column>
                         <f:facet name="footer">  
            <p:commandButton id="viewButton" value="View" icon="ui-icon-search"  
                    update=":form:display" oncomplete="dneDialog.show()"/>  
        </f:facet>  
                    </p:dataTable>
                    
      <p:dialog id="dialog" header="Detail" widgetVar="dneDialog" resizable="false"  
              width="200" showEffect="clip" hideEffect="fold">  
  
        <h:panelGrid id="display" columns="2" cellpadding="4">  
            <h:outputText value="NoEtud" />  
            <h:outputText value="#{deuxNotes.selectedDeuxNotesEntity.idEtudiant}" />  
        </h:panelGrid>  
    </p:dialog>  
                </h:form>
            </f:view>

Re: Datatable Basic Selection not working

Posted: 25 Feb 2013, 17:51
by smithh032772

Re: Datatable Basic Selection not working

Posted: 16 Apr 2013, 17:30
by Salim
thank you