private boolean hasInputWithValue ( ) { // Visit all children of the fieldset of type Input AbstractVisitorWithResult < Boolean > visitor = new AbstractVisitorWithResult < Boolean > ( ) { @ Override public WComponentTreeVisitor . VisitorResult visit ( final WComponent comp ) { // Check if the component is an Input and has a value if ( comp instanceof Input && ! ( ( Input ) comp ) . isEmpty ( ) ) { setResult ( true ) ; return VisitorResult . ABORT ; } return VisitorResult . CONTINUE ; } } ; visitor . setResult ( false ) ; TreeUtil . traverseVisible ( this , visitor ) ; return visitor . getResult ( ) ; }
Checks at least one input component has a value .