【问题标题】:Using h:button to generate a button and link to a non-jsf page使用 h:button 生成按钮并链接到非 jsf 页面
【发布时间】:2014-08-25 13:24:20
【问题描述】:

我想使用 h:button 导航到我的应用程序中的另一个页面,这不是一个 jsf 页面(它是一个 /context/strutsPage.do 页面)。不幸的是,我在这个标签中只有结果属性,我知道它只能访问 jsf 页面。我如何仍然使用按钮标签(或类似标签),因为我真的想生成一个按钮而不是链接?是否有另一种生成按钮的解决方案?
谢谢
PS我暂时在同一个应用程序中使用struts和jsf,以便逐渐迁移到jsf

【问题讨论】:

标签: jsf button


【解决方案1】:

据我所知h:button 具有onclick 属性。你可以做:

<h:button onclick="window.location.href='some_page.html'" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-12-10
    • 1970-01-01
    • 2011-06-19
    • 1970-01-01
    • 2012-12-25
    • 1970-01-01
    • 1970-01-01
    • 2013-07-03
    相关资源
    最近更新 更多