Wicket basic implementation of wizard steps

会有一股神秘感。 提交于 2019-12-11 12:37:10

问题


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;
}   

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?


回答1:


You can (have to) implement a wizard yourself, it is not too hard.

I would use a AjaxTabbedPanel as basis. You just have to add a 'next', 'back' and 'finish' bar below, and do some CSS styling



来源:https://stackoverflow.com/questions/32859108/wicket-basic-implementation-of-wizard-steps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!