2013-07-09 53 views
0

我對p:autocomplete元素有問題。它嵌套在雙重UI中:重複,並且不響應。如果我把它放在第二個UI中:重複並將它放在第一個重複中或兩個重複中,自動完成功能正常工作。有人有線索可能是一個問題嗎?自動完成功能在ui中不起作用

+0

請提供您的代碼,jsp頁面和託管bean。 –

+0

您使用的是JSF impl/version? [請記住在每個JSF問題中提及](http://stackoverflow.com/tags/jsf/info)。例如,較舊的Mojarra版本在處理來自嵌套''的ajax請求期間存在部分狀態管理問題。解決方案很簡單:升級。 – BalusC

回答

0

這是我的代碼。

  <ui:repeat id="joinConditionPart" 
      value="#{join.joinParts}" var="joinPart" varStatus="conditionIndex" > 
      <div class="line-group" > 
      <p:outputLabel value="ON" rendered="#{conditionIndex.index == 0}" 
      styleClass="join-left" /> 
      <p:outputLabel value="AND" rendered="#{conditionIndex.index != 0}" 
      styleClass="join-left" /> 
      <p:autoComplete id="leftJoinPart" 
       converter="stringConverter" 
       completeMethod="#{editRuleBBean.autocomplete()}" 
       dropdown="true" 
       disabled="#{editRuleBBean.rule.type == 'ANALYSIS' and 
       editRuleBBean.rule.id != null}"> 

      </p:autoComplete> 
      <span class="text join-middle">=</span> 

      <p:autoComplete id="rightJoinPart" 
       rendered="true" 
       value="#{joinPart.rightPart}" 
       completeMethod="#{editRuleBBean.autocomplete()}" 
       converter="stringConverter" 
       dropdown="true" 
       > 
       </p:autoComplete> 

Bean工作正常。

+0

這是嵌套的UI:重複。 – user2564445

相關問題