代码之家  ›  专栏  ›  技术社区  ›  Jinesh

在jsf+RichFaces+Facelets中动态显示面板

  •  1
  • Jinesh  · 技术社区  · 16 年前

    1 回复  |  直到 16 年前
        1
  •  2
  •   Damo    16 年前

    你的意思是除了在a4j的reRender属性中指定内容面板的ID之外 commandButton/commandLink/support 标签(或任何你用作菜单的东西)?

    你可以使用a4j包含,如下所示:

    <rich:panel id="menu">
       <a4j:commandLink id="link1" action="#{myBean.setContentViewIdLink1}" reRender="content">Link 1</a4j:commandLink>
    </rich:panel>
    
    <rich:panel id="content">
       <a4j:include viewId="#{myBean.viewId}"/>
    </rich:panel>
    

    更新#2:

    public void setContenViewIdLink1() {
      this.contentView = "/page1.xhtml";
    }
    
    推荐文章