With a normal FormComponent, you can disable default form processing on a 
submit button, and still process that component by calling processInput().  
This doesn't work with FormComponentPanel, because processInput() doesn't call 
the processInput() method of child FormComponents, and is final so it cannot be 
overridden.  The result is that after processing, the FormComponentPanel will 
always be null.  Is there a proper way of processing FormComponentPanels when 
default form processing is disabled?

I tried adding the following method to my FormComponentPanel class:

public final void process() {
  visitFormComponentsPostOrder(this, new IVisitor<FormComponent<?>, Void>() {
    @Override
    public void component(FormComponent<?> formComponent, IVisit<Void> visit) {
      formComponent.processInput();
    }
  });
}

Now I can call formComponentPanel.process() in the onSubmit of my Button and it 
seems to work just fine.   Is there another way of doing this?  If not, should 
this method, or something similar, be part of the FormComponentPanel class?

Joel

Reply via email to