Update p:inputText

Components, Ajax Framework, Utilities and More.
Post Reply
HackTack
Posts: 4
Joined: 14 Mar 2017, 18:36

20 Apr 2017, 09:15

Hi!

I have a <p:commandButton to edit differents Data.

Code: Select all

<p:commandButton action="#{memberTestController.goEdit(getFieldValue('id'))}" icon="fa fa-pencil" ajax="true" update="@form global-growl" disabled="#{!memberTestController.canStart}" />
If you click on another dataset, the input field is not updated, but the outputText

Code: Select all

<h:outputText value="#{memberDetailController.plotManager.form.plot.code}" /> its ok!

Code: Select all

<p:inputText id="plotcode" styleClass="col-xs-10" value="#{memberTestController.form.plot.code}" disabled="#{!memberTestController.plotEditable}"> here are the old Params
	<p:ajax event="keyup" listener="#{memberTestController.handlePlotChange()}" update="@form"/>
</p:inputText>
Why does it make no update on <p:inputText ???

Thanks
FI

Jan Eckert
Posts: 35
Joined: 11 Sep 2014, 10:13
Location: Brussels, Belgium

20 Apr 2017, 10:23

Impossible to say without complete, runnable code. My bet is on cascaded forms. :twisted:
Primefaces 4.0 + 5.0
Tomcat 7.0.42
Eclipse Luna 4.4.0

kukeltje
Expert Member
Posts: 8433
Joined: 17 Jun 2010, 13:34
Location: Netherlands

20 Apr 2017, 18:16

Ronald van Kuijk
______________________________
PrimeFaces 5.2, PrimeFaces plus 0.0.2 | JbossWildfly 8.1| Mojarra 2.2.8
Fedora 21, Firefox 'most recent'
Read the forum posting rules
Beginners: https://jsf.zeef.com/bauke.scholtz

HackTack
Posts: 4
Joined: 14 Mar 2017, 18:36

20 Apr 2017, 20:05

The Script Snippet:

Code: Select all


	<p:accordionPanel multiple="false" id="accordion">
		<p:tab title="Test" id="plots" disabled="#{memberDetailController.incompleteData}">
			<h:form id="test-form">
				<p:panel>
					<div class="col-xs-12 clearPaddingLeft gap-top-medium">
						<p:dataTable value="#{memberDetailController.plotManager.model.plotHeaders.items}" var="plot">
							<p:column styleClass="name" rendered="#{memberDetailController.isShowSection('memberfee',false)}">
							<span class="pencil">
								<p:commandButton action="#{memberDetailController.goEditPlot(plot.getFieldValue('id'))}" icon="fa fa-pencil" update="@form" ajax="true"  />
							</span>
							</p:column>
						</p:dataTable>
					</div>
				</p:panel>
							
				<p:panel styleClass="card-4 col-xs-12 gap-top-medium gapTopSmall" rendered="#{memberDetailController.isShowSection('plots',true)}">
					<div class="col-xs-12 clearPaddingLeft">
						<div class="col-xs-12 col-md-5 clearPaddingLeft clearPaddingRight gap-bottom-small">
							<p:outputLabel styleClass="col-xs-6 bold" />
							+<h:outputText value="#{memberDetailController.plotManager.form.plot.area}" /> -> its fine!!!
							<p:inputText styleClass="col-xs-10" value="#{memberDetailController.plotManager.form.plot.area}">  no update!!!!
								<f:convertNumber minFractionDigits="1" maxFractionDigits="1"/>
							</p:inputText>
						</div>
						<p:commandButton value="Abbrechen" action="#{memberDetailController.cancelEdit('plots')}" update="@form" immediate="true"/>
					</div>
				</p:panel>
			</h:form>
		</p:tab>
	</p:accordionPanel>





kukeltje
Expert Member
Posts: 8433
Joined: 17 Jun 2010, 13:34
Location: Netherlands

20 Apr 2017, 20:27

Snippets are 'useless'.. The error can be related to parts you did not post. If you post code, post a 'mcve' (http://stackoverflow.com/help/mcve) and did you check your code against everything in the other link I posted?
Ronald van Kuijk
______________________________
PrimeFaces 5.2, PrimeFaces plus 0.0.2 | JbossWildfly 8.1| Mojarra 2.2.8
Fedora 21, Firefox 'most recent'
Read the forum posting rules
Beginners: https://jsf.zeef.com/bauke.scholtz

Monaliz
Posts: 2
Joined: 23 Apr 2017, 08:22
Contact:

23 Apr 2017, 08:50

Thankyou so much make me already join this

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot], Google [Bot] and 48 guests