Datatable Basic Selection not working

UI Components for JSF
Post Reply
Salim
Posts: 2
Joined: 25 Feb 2013, 14:04
Contact:

25 Feb 2013, 14:20

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>
Salim
Java 7 / PrimaFaces 3.2 / JSF 2.1
Tomcat 7 / Ubuntu 12.04 TLS

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

25 Feb 2013, 17:51

Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Salim
Posts: 2
Joined: 25 Feb 2013, 14:04
Contact:

16 Apr 2013, 17:30

thank you
Salim
Java 7 / PrimaFaces 3.2 / JSF 2.1
Tomcat 7 / Ubuntu 12.04 TLS

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Mordets and 8 guests