Filtering / Sorting ?! Help

UI Components for JSF
Post Reply
rippal
Posts: 19
Joined: 26 Jan 2011, 15:59

18 Mar 2011, 12:06

Hy primefaces users!

I can't implement Filtering and Sorting to my DataTable!! :(
I already tried so many different things and i don't know what I have to
do that it will work. I use the Code from showcase, svn and other topics but
it wont work.

All is displayed right (the Input for Filtering and the Arrows for Sorting), but nothing works.

Please help me!
Where is the problem? (missing Libraries?, code?,....)

Primeface Version: 2.2 RC2
Server: Glassfish V3

Code of .xhtml Site:

Code: Select all

<p:dataTable value="#{FormGenerator.openForms}"
				update="center_content" widgetVar="dataTable1" var="form"
				dynamic="true" id="dataTable1" rendered="true"
				emptyMessage="Keine offenen Formulare">
				<f:facet name="header">
     	    		Offene Formulare
 	    		</f:facet>
				<p:column 
					sortBy="#{form.ID}"
      				filterBy="#{form.ID}">
					<f:facet name="header">
						<h:outputText value="ID" />
					</f:facet>
					<h:outputText value="#{form.id}" />
				</p:column>
				<p:column style="width:10%">
					<f:facet name="header">
						<h:outputText value="MatNr." />
					</f:facet>
					<h:outputText value="#{form.matNr}" />
				</p:column>
				<p:column style="width:30%">
					<f:facet name="header">
						<h:outputText value="Formular" />
					</f:facet>
					<h:outputText value="#{form.formName}" />
				</p:column>
				<p:column style="width:30%">
					<f:facet name="header">
						<h:outputText value="Datum" />
					</f:facet>
					<h:outputText value="#{form.date}" />
				</p:column>
				<p:column style="width:10%">
					<f:facet name="header">
						<h:outputText value="Status" />
					</f:facet>
					<h:outputText value="nicht angeschaut"
						rendered="#{form.status == 0}" />
					<h:outputText value="genehmigt" rendered="#{form.status == 1}" />
					<h:outputText value="nicht genehmigt"
						rendered="#{form.status == 2}" />
					<h:outputText value="Kontakt aufnehmen"
						rendered="#{form.status == 3}" />
				</p:column>
				<p:column style="width:10%">
					<f:facet name="header">
						<h:outputText value="Optionen" />
					</f:facet>
					<p:lightBox />
					<p:commandButton value="Anzeigen" ajax="true"
						action="#{FormGenerator.generateFilledForm}"
						oncomplete="jQuery.colorbox({href:'#{request.contextPath}#{FormGenerator.getPath()}', iframe: true, width: '60%', height: '95%'}); return false;">
						<f:setPropertyActionListener value="#{form}"
							target="#{FormGenerator.selectedFilledForm}" />
					</p:commandButton>
				</p:column>
			</p:dataTable>


THX....

prophet
Posts: 92
Joined: 17 Mar 2011, 19:59

19 Mar 2011, 23:35

have you <h:form> before <p:dataTable> tag and </h:form> after </p:dataTable>? and try sortBy="#{form.id}" and filterBy="#{form.id}.

rippal
Posts: 19
Joined: 26 Jan 2011, 15:59

20 Mar 2011, 19:28

thanks.. yes i do have all this things!

and it doesn't work!

does anyone else have a answer for me??? :(

pleeease

prophet
Posts: 92
Joined: 17 Mar 2011, 19:59

22 Mar 2011, 15:53

can you show code in your bean class?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests