porting - What is the equivalent of IVisitor.CONTINUE TRAVERSAL in wicket 1.5 -


i'm porting our wicket 1.4 app wicket 1.5. visitors very different. know how handle continual_traversal in wicket 1.5? existing 1.4 code below:

 public class myformvisitor implements ivisitor<component, object>, serializable {      private static final long serialversionuid = 7271477325583441433l;     private set<component> visited = new hashset<component>();      @override     public object component(component c) {         if (!visited.contains(c)) {             visited.add(c);              c.add(new mandatorybehavior());             c.add(new errorhighlightbehavior());         }         return ivisitor.continue_traversal;    } 

just convert method , should fine:

@override public void component(final component c, final ivisit<void> visit) {     if (!visited.contains(c)) {         visited.add(c);          c.add(new mandatorybehavior());         c.add(new errorhighlightbehavior());     } } 

as can see in documentation linked, traversal controlled via ivisit passed method. if none of methods either stop or not go deeper called, traversal continue.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -