Hello.
I am having trouble with this as well. But, the difference in my
situation is that the inputText components that I am trying to reset are
in a table. I'm having trouble getting a hold of those components in
the table so I can reset the values. I've tried a couple things, such
as binding the table to my bean and then trying to loop through all of
its children (recursively) to find the inputTexts... but that didn't
solve the issue for me.
Any idea on what I can do with the inputText components in the
table?? Thanks...
Dave
________________________________
From: Martin Marinschek [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 12, 2007 12:20 PM
To: MyFaces Discussion
Subject: Re: PPR - Update an inputText dont work
Hi Ariel,
you'll have to clean out the value of the input-text - the problem that
you are seeing is that JSF takes the current value in the inputText
component, and sees this as more important than the backing bean value.
so you'll have to bind your inputText to your backing bean (using
binding="#{myBean.myInputText}", and a getter/setter pair getMyInputText
/ setMyInputText in your backing bean) and then call:
myInputText.setSubmittedValue(null);
myInputText.setValue(null);
myInputText.setLocalValueSet(false);
with this, your inputText will reread the value from the backing bean!
regards,
Martin
On 7/12/07, Ariel Di Mattia <[EMAIL PROTECTED]> wrote:
Hi all,
I am having some problems with PPR. When I try to update an inputText,
it's
simply do nothing (no errors or warnings). But, if I put the same
partialTriggers in other component (i.e. outputFormatted) with same
backing
bean, all works fine.
Here is my code:
<f:view>
<tr:document title="#{title.applicationName}">
<t:div styleClass="mainPanel">
<tr:form id="form">
<tr:commandButton id="pSub_button"
immediate="true"
partialSubmit="true"
text="Update"
actionListener="#{newAgent.editContact}">
</tr:commandButton>
<tr:panelLabelAndMessage label="OUTPUT FORMATTED: ">
<tr:outputFormatted id="cmdTarget1"
partialTriggers="pSub_button"
styleUsage="instruction"
value="#{newAgent.nombreContacto
}">
</tr:outputFormatted>
</tr:panelLabelAndMessage>
<tr:panelLabelAndMessage label="INPUT TEXT: ">
<tr:inputText id="cmdTarget3"
partialTriggers="pSub_button"
value="#{newAgent.nombreContacto}">
</tr:inputText>
</tr:panelLabelAndMessage>
</tr:form>
</t:div>
</tr:document>
</f:view>
And backing bean method for actionListener:
public void editContact(ActionEvent event) {
this.setNombreContacto("NOMBRE PPR");
}
Any ideas?. Is possible to do an inputText update via PPR?. I think
that yes,
but...my method seems to be incorrect :((((
Thanks for all!!!.
Ariel.
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
The information transmitted herewith is sensitive information of Chordiant
Software or its customers and is intended only for use to the individual or
entity to which it is addressed. If the reader of this message is not the
intended recipient, you are hereby notified that any review, retransmission,
dissemination, distribution, copying or other use of, or taking of any action
in reliance upon, this information is strictly prohibited. If you have received
this communication in error, please contact the sender and delete the material
from your computer.