ValueChangeListener For p:InputText inside p:DataTable

UI Components for JSF
Post Reply
abhijit.nayak
Posts: 13
Joined: 27 Jul 2011, 13:55

20 Sep 2011, 11:58

Hi,
The ValueChangeListener for a p:inputText, which is nested inside a p:DataTable doesn't work. Following is my Code :-

JSF :-

Code: Select all

			<h:panelGrid id="displayPGID" columns="1">
			<p:messages showDetail="true" />
				<p:panel id="src1ID" header="LEDGER" toggleable="true" closable="true" toggleSpeed="500" closeSpeed="2000" widgetVar="panel">
				<p:dataTable var="varFMSelectedTransRecs"
					value="#{reconForceMatchBean.selectedLEDGERTransList}"
					style="width:100%;" id="fMSelectedTransRecsID" 
					selection="#{reconForceMatchBean.selectedTransListForMerge}"
					rowSelectListener="#{reconForceMatchBean.onRowSelectPreForceMatch}"
					rowUnselectListener="#{reconForceMatchBean.onRowUnSelectPreForceMatch}"
					selectionMode="multiple"
					widgetVar="ledgerDTBLWidget"
					rowStyleClass="#{varFMSelectedTransRecs.parentReconTxnId != null ? 'old' : null}"
					binding="#{reconForceMatchBean.ledgerTableComponent}">
					 
					<p:column headerText="#{build.matchingStatus}" >
						<h:outputText value="#{varFMSelectedTransRecs.matchingStatus}" />
					</p:column>
					<p:column headerText="#{build.reasonCD}">
						<h:outputText value="#{varFMSelectedTransRecs.breakReasonCode}" />
					</p:column>
					<p:column headerText="#{build.assetCD}">
						<h:outputText value="#{varFMSelectedTransRecs.isin}" />
					</p:column>
					<p:column headerText="#{build.transNum}">
						<h:outputText value="#{varFMSelectedTransRecs.transactionNumber}" />
					</p:column>
					<p:column headerText="#{build.itemType}">
						<h:outputText value="#{varFMSelectedTransRecs.itemType}" />
					</p:column>
					<p:column headerText="#{build.qty}">
						<h:inputText value="#{varFMSelectedTransRecs.quantity}" 
						valueChangeListener="#{reconForceMatchBean.splitRecordPreStep}"
						immediate="true"
						onchange="submit();">
						</h:inputText>	
					</p:column>
				</p:dataTable>
				</p:panel>

BB

Code: Select all


    /**
     * 
     */
    public void splitRecordPreStep(ValueChangeEvent vce) {
    	System.out.println(this.getSelectedTransListForMerge()[0].getQuantity());
    	System.out.println(vce.getOldValue() + "-" + vce.getNewValue());
    }

Let me know what is the solution for making this work. Please provide pointers as to what I am doing wrong.
Abhijit
primefaces-3.0.M2-SNAPSHOT

rafamarquez
Posts: 5
Joined: 07 May 2013, 09:21

08 May 2013, 17:18

Hi there,

Did you find the solution to make valueChangeListener working ok?

Thanks!

fubz
Posts: 1
Joined: 24 Dec 2015, 16:14

18 Feb 2016, 18:14

I'm also curious on the solution to this issue.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 60 guests