我们可以在primefaces中拥有动态更新属性值

时间:2015-07-13 13:27:22

标签: jsf jsf-2 primefaces

有一种情况我们希望根据选项卡中的数据选择更新折叠面板中的某些选项卡,并根据某些选择从更新中排除某些选项卡。

<p:accordionPanel id="cc-accordion-panel" 
                              widgetVar="AccorPnl"
                              activeIndex="#{managerBean.accordionTabIndices}"
                              multiple="true"
                              dynamic="false"
                              styleClass="accordion-with-ancors"
                              style="border-bottom:1px solid #A3BCC4;">

               <p:ajax  event="tabChange"
                        update="cc-accordion-panel:datatable1
                                cc-accordion-panel:datatable2
                                cc-accordion-panel:datatable3
                                cc-accordion-panel:datatable4" />
    ...
    ...
  </p:accordionPanel>

我们可以在运行时从支持bean属性获取更新ID列表吗?有点像...

<p:accordionPanel id="cc-accordion-panel" 
                              widgetVar="#{widgetVarPrefix}AccorPnl"
                              activeIndex="#{managerBean.accordionTabIndices}"
                              multiple="true"
                              dynamic="false"
                              styleClass="bx-accordion-with-ancors"
                              style="border-bottom:1px solid #A3BCC4;">

                <p:ajax event="tabChange"
                        update="#{managerBean.accordionUpdateIds}" 
                        process="#{managerBean.accordionUpdateIds}"/>

        ...
        ...
        ...
  </p:accordionPanel>

如何实现这一目标?

0 个答案:

没有答案