在p:wizard中以编程方式设置当前显示的选项卡 [英] Set current displayed tab programmatically in p:wizard

查看:111
本文介绍了在p:wizard中以编程方式设置当前显示的选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过编程方式在 <p:wizard> ?

Is it possible to set current displayed tab programmatically in <p:wizard>?

例如,我希望针对包含向导的同一页面的两个不同请求选择不同的选项卡.

For example, I want that for two different request to the same page which contains a wizard, to have a different tab selected.

我当前要执行的操作是,使向导具有多个选项卡,在第二个选项卡中,我将重定向到另一个页面,因此,当我返回时,我想转到导致重定向的最后一步.

What I am currently trying to do, is to have a wizard with many tabs, in the second tab I have a redirection to another page, so when I come back I want to come to the last step which caused the redirection.

你能帮我吗?非常感谢!

Can you please help me ? Thank you a lot !

推荐答案

根据 primefaces文档 p:wizard 标签的step属性,用于指定您当前所在的向导的步骤.

According to primefaces documentation there's a step attribute for p:wizard tag, which specifies the step of the wizard you're currently in.

属性:步骤
默认值: 0
类型:字符串
说明:当前流程中的步骤的标识

attribute: step
default value: 0
type: String
description: Id of the current step in flow

您必须将此属性绑定到支持bean的值,并在重定向和返回期间对其进行维护.如果向导的Bean是@ViewScoped,则将在重定向步骤中丢失该信息,因此您必须使用

You must bind this attribute to a value of your backing bean and maintain it during redirection and coming back. If your wizard's bean is @ViewScoped you'll loose that info during redirection step, so you have to pass it using a view param or flash scope.

这篇关于在p:wizard中以编程方式设置当前显示的选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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