Wicket 向导步骤的基本实现 [英] Wicket basic implementation of wizard steps
问题描述
是否有任何基本的实现 wicket 6.20 提供了类似于 这张图片或如果另一个不起作用?
在查看文档时我找不到任何接近它的东西,所以我开始做我自己的实现,如
is there any basic implementation wicket 6.20 provides for a step overview functionality like in this picture or like this if the other won't work?
When looking at the documentation I couldn't find anything close to it, so I started by doing my own implementation like
public List<String> getSteps(WizardModel model){
Iterator<IWizardStep> iterator = model.stepIterator();
List<String> steps = new ArrayList<String>();
for(int i = 1; iterator.hasNext(); i++){
steps.add(String.valueOf(i));
iterator.next();
}
//model.getActiveStep(); unnecessary in this context
return steps;
}
获取列表中所有可能的步骤.现在我将继续获取当前面板的索引(如果可能)并通过 isColmplete();
获取它的状态以将其标记为不同的颜色.但我不敢相信,我是第一个遇到这个问题的人.
我应该继续我的想法还是有更好的选择?
to get all possible steps in a List. And now I would go on by getting the index of the current panel (if possible) and get it's state by isColmplete();
to mark it in a different color. But I can't believe, that I'm the first one with this problem.
Should I go on with my idea or is there a better option?
推荐答案
你可以(必须)自己实现一个向导,不会太难.
You can (have to) implement a wizard yourself, it is not too hard.
我会使用 AjaxTabbedPanel
作为基础.你只需要在下面添加一个next"、back"和finish"栏,并做一些CSS
样式
I would use a AjaxTabbedPanel
as basis. You just have to add a 'next', 'back' and 'finish' bar below, and do some CSS
styling
这篇关于Wicket 向导步骤的基本实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!