2015-12-02 42 views
1

來自p:commandLink的響應不刷新input text字段,其​​中具有相同值的output text字段正在刷新。 這是我的代碼。ajax響應後輸入文本字段不刷新

<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> 

和輸入文本字段:

<h:inputText value="#{customerProfileFormBean.customer.customerName}" /> 
<h:outputText value="#{customerProfileFormBean.customer.customerName}" /> 
+2

最有可能看到至少一些代碼 –

+0

在更改ajax上OutputText的值後,最有可能調用InputText字段在頁面加載之前獲取它的舊值。如果你分享你的代碼,我們可以幫助你更好。 – proudandhonour

+1

嘗試將id =「custName」放入inputText,並在update =「:content-area:dataEntryForm:custName」上引用它。 –

回答