重新定位导航按钮号码:向导 [英] Repositioning nav buttons in p:wizard

查看:159
本文介绍了重新定位导航按钮号码:向导的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想放置权下primefaces向导成分的工序标题导航按钮:

I wish to place the navigation buttons right under the step titles of the primefaces wizard component:

由于primefaces产生阶梯砖和向导的内容都在一起,我不知道如何将向导组件的两部分之间​​插入一个元素(在这种情况下,导航按钮)。
反正这样做呢?

Since primefaces generates the both step tiles and content of the wizard together, I wasn't sure on how to insert an element (in this case, the nav buttons) between the two parts of the wizard component. Anyway to do this?

感谢:)

推荐答案

最简单的办法是设置向导不显示导航按钮,然后创建一个属于自己的按钮:

The easiest solution is to set your wizard not to show the navigator buttons, then create a button of your own:

<p:wizard widgetVar="myWizard" showNavBar="false" ... >
<p:commandButton style="..." value="Back" icon="ui-icon-arrow-1-w" 
    iconPos="right" type="button" onclick="myWizard.back();" />

<p:commandButton style="..." value="Next" icon="ui-icon-arrow-1-e" 
    iconPos="left" type="button" onclick="myWizard.next();" />


您也可以做到这一点与jQuery和CSS,但在我看来,这是比较困难的这种方式。


You can also do this with jQuery and CSS, but in my opinion it is more difficult this way.

编辑: -

有关Primefaces5.1 +

For Primefaces5.1 +

<p:commandButton style="..." value="Back" icon="ui-icon-arrow-1-w" iconPos="right" onclick="PF('myWizard').back()" />
<p:commandButton style="..." value="Next" icon="ui-icon-arrow-1-e" iconPos="left" onclick="PF('myWizard').next();" />

这篇关于重新定位导航按钮号码:向导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆