DataTable filter fails in composite component

UI Components for JSF
Post Reply
tkovacs
Posts: 2
Joined: 02 Jun 2010, 11:05

02 Jun 2010, 11:41

Hi!

I created a composite component which encapsulates a dataTable. If this table gets their value attribute from a parameter the filter fails because the result of the filtering is always an empty list. Even if I clear the filter input field I get an empty result list too.
Component code:

Code: Select all

<html ...>

<composite:interface>
	<composite:attribute name="partnerListTarget" required="true" />
	<composite:attribute name="selectedPartnerTarget" required="true" />
	<composite:attribute name="selectAction" required="true"
		method-signature="java.lang.String action()" />
</composite:interface>

<composite:implementation>
	<p:commandButton id="selectButton" value="#{msgs['general.select']}"
		oncomplete="partnerListDialog.show();" />
		
	<p:dialog widgetVar="partnerListDialog"
		header="#{msgs['partner.select']}" fixedCenter="true">
		
		<p:dataTable id="partnerList" var="partnerVar"
			value="#{cc.attrs.partnerListTarget}" selectionMode="single"
			selection="#{cc.attrs.selectedPartnerTarget}" dynamic="true">
			<p:column id="nevColumn" filterBy="#{partnerVar.nev}">
				<f:facet name="header">
					<h:outputText value="#{msgs['admin.partner.nev']}" />
				</f:facet>
				<h:outputText value="#{partnerVar.nev}" />
			</p:column>
			more columns...
		</p:dataTable>
		
		<p:commandButton value="#{msgs['general.select']}"
			action="#{cc.attrs.selectAction}"
			oncomplete="partnerListDialog.hide();" update="@form" />
	</p:dialog>
</composite:implementation>

</html>
Usage:

Code: Select all

<util:PartnerSelect partnerListTarget="#{erkeztetesBean.partnerList}"
	selectAction="#{erkeztetesBean.select}"
	selectedPartnerTarget="#{erkeztetesBean.selectedPartner}"	/>
If I change the value attribute of the dataTable from #{cc.attrs.partnerListTarget} to #{erkeztetesBean.partnerList} in the implementation it works fine. But I wouldn't like to wire that bean to the component code. Is it a bug or am I doing something wrong?

Tamas Kovacs
PrimeFaces 2.0.3 snapshot, Mojarra 2.0.2, Tomcat 6.0, Chrome/Firefox

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 Jun 2010, 11:58

Hi Tamas,

I see you've created an issue, we'll look into this in detail.

tkovacs
Posts: 2
Joined: 02 Jun 2010, 11:05

03 Jun 2010, 12:07

cagatay.civici wrote:Hi Tamas,

I see you've created an issue, we'll look into this in detail.
Thank you.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests