private void addDefaultsIfNeeded ( ServletRequest req ) throws JspException { if ( _defaultSelections != null ) { Iterator iterator = _defaultSelections . iterator ( ) ; while ( iterator . hasNext ( ) ) { Object selection = iterator . next ( ) ; if ( ! _optionList . contains ( selection ) ) { addOption ( req , selection . toString ( ) , selection . toString ( ) ) ; } } } }
add the default values specified in the tag if they are needed .