1

the response from p:commandLink is not refreshing the input text field where as the output text field with the same value is getting refreshed. here is my code.

<p:commandLink value="#{customerProfile.customerName}" style="font-size:13px !important"
    styleClass="clickcolumn" title="select" immediate="true" 
    update="content-area:dataEntryForm:custName"
    action="#{customerProfileBean.enableCustomerProfile}">
        <f:param name="cust_id" value="#{rustomerProfile.rustomerId}" />
</p:commandLink>

and the input text field:

<h:inputText value="#{customerProfileFormBean.customer.customerName}" />
<h:outputText value="#{customerProfileFormBean.customer.customerName}" />
Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Yogeesha
  • 11
  • 2
  • 2
    It would be helpful to see at least some code – Tobias Baumeister Dec 02 '15 at 11:49
  • Most probably after changing the value of OutputText on ajax call the the InputText fields is obtaining it's old value back just before page load. If you share your code we can help you better. – Gaurav Jeswani Dec 02 '15 at 11:49
  • 1
    Try to put an id="custName" to inputText and referece it on update=":content-area:dataEntryForm:custName" like that. – Karpinski Dec 02 '15 at 12:03
  • 1
    Are the `` and `` in the same `NamingContainer` like a `form` or not? Also you should **always** put `id` attribute on the components. Another hint is try not to mix `primefaces` and pure `JSF` together. But if you problem still exist provide some code or atleast the complete xhtml page. – STaefi Dec 02 '15 at 12:18
  • Please create an [mcve] the moment you create a question. That prevents all these comments and will get you better help quicker – Kukeltje Dec 02 '15 at 12:22

1 Answers1

0

On my own you should exclude immediate="true" attribute from your p:commandLink and this will solve the problem. For more details you can have a look trying-to-understand-immediate-true-skipping-validation-when-it-shouldnt

Community
  • 1
  • 1
delovepr
  • 71
  • 1
  • 1
  • 6