【问题标题】:Primefaces Outputpanel deferred=truePrimefaces 输出面板延迟=真
【发布时间】:2015-04-26 04:33:12
【问题描述】:
<h:form id="linkpanel">
<p:commandLink id="TestPanle" value="Test" update="contentOutputPanelId"/>
</h:form>
...
<h:form id="reRenderForm">
 <p:outputPanel id="contentOutputPanelId" deferred="true"  style="padding:5px;">
  <ui:include src="/pages/test.xhtml"/>
</p:outputPanel>
<h:form>

当按下我按下 commandLink 按钮时,它将更新 contentOutputPanelId 并包含 test.xhtml。我的怀疑是没有 deferred="true" 当我按下刷新页面时它不会包含页面它工作正常。否则给定 deferred="true" 它工作正常。

【问题讨论】:

  • @mss arul 当您尝试更新contentOutputPanelId 时,您的contentOutputPanelId 未加载。是这样吗?

标签: jsf primefaces


【解决方案1】:

你的怀疑是有道理的:

ui:include 是一个标签处理程序,而p:outputpanel 是一个UIComponent。 taghandler 在 view-build time 被评估和解析,也就是在设置视图的组件树时(基本上,决定页面中实际将要be )。另一方面,组件在 view-render 进行评估,这主要与标记解释有关

这对您意味着,在评估 ui:include 时,p:outputPanel 不在图片中,因此无法影响其处理。包含将发生。

标记处理程序仅在新页面加载时评估,而不是在回发时评估,因此此时它不再重要

【讨论】:

    猜你喜欢
    • 2021-02-19
    • 1970-01-01
    • 2017-01-14
    • 1970-01-01
    • 1970-01-01
    • 2013-12-29
    • 2012-08-07
    • 1970-01-01
    • 2012-11-27
    相关资源
    最近更新 更多