【问题标题】:How To Load a jsf page to another center layout unit如何将 jsf 页面加载到另一个中心布局单元
【发布时间】:2014-11-06 12:02:46
【问题描述】:

我是 JSf 技术的新手,我正在创建一个使用 primefaces 的系统。我在primefaces中使用Layoutunit,我已经离开了,北和南的layoutunit。我希望我的菜单位于西部布局单元中,内容位于中心单元中。我想在单击菜单时将相应的 jsf 页面加载到中心布局。我怎样才能做到这一点?这是我的示例代码。

<p:layout fullPage="true">
        <p:layoutUnit position="north">
            <p>Header Here</p>
        </p:layoutUnit>
         <p:layoutUnit position="west">
              <p:menu >
                    <p:submenu label="Application" icon="ui-icon-refresh">
                        <p:menuitem value="Page One" 
                                    ajax="false" 
                                    actionListener="#{bean.setPage('page2')}" />
                        <p:menuitem value="Page Two" 
                                    ajax="false" 
                                    actionListener="#{bean.setPage('page1')}"/>
                    </p:submenu>
                </p:menu>
        </p:layoutUnit>
         <p:layoutUnit position="center">
            <p>Content Here</p>
        </p:layoutUnit>
    </p:layout>

【问题讨论】:

    标签: jsf primefaces


    【解决方案1】:

    我建议你使用 JSF 模板。已显示的示例是 link

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-24
      • 1970-01-01
      • 2015-05-05
      • 1970-01-01
      • 2016-01-24
      相关资源
      最近更新 更多