public int doStartTag ( ) throws JspException { // evaluate the datasource and disabled state. Object val = evaluateDataSource ( ) ; if ( val != null ) _match = val . toString ( ) ; // Store this tag itself as a page attribute pageContext . setAttribute ( RADIOBUTTONGROUP_KEY , this ) ; _defaultRadio = evaluateDefaultValue ( ) ; // see if there are errors in the evaluation if ( hasErrors ( ) ) return SKIP_BODY ; ServletRequest req = pageContext . getRequest ( ) ; if ( _cr == null ) _cr = TagRenderingBase . Factory . getConstantRendering ( req ) ; _writer = new WriteRenderAppender ( pageContext ) ; if ( isVertical ( ) ) { _cr . TABLE ( _writer ) ; } // if this is a repeater then we shouid prime the pump... _dynamicAttrs = evaluateOptionsDataSource ( ) ; assert ( _dynamicAttrs != null ) ; assert ( _dynamicAttrs instanceof Map || _dynamicAttrs instanceof Iterator ) ; if ( _repeater ) { if ( _dynamicAttrs instanceof Map ) { _dynamicAttrs = ( ( Map ) _dynamicAttrs ) . entrySet ( ) . iterator ( ) ; } if ( ! ( _dynamicAttrs instanceof Iterator ) ) { String s = Bundle . getString ( "Tags_OptionsDSIteratorError" ) ; registerTagError ( s , null ) ; return SKIP_BODY ; } while ( ( ( Iterator ) _dynamicAttrs ) . hasNext ( ) ) { _repCurItem = ( ( Iterator ) _dynamicAttrs ) . next ( ) ; if ( _repCurItem != null ) break ; } if ( isVertical ( ) ) _cr . TR_TD ( _writer ) ; DataAccessProviderStack . addDataAccessProvider ( this , pageContext ) ; } //write(results.toString()); // This is basically this is if enough for 5 options _saveBody = new InternalStringBuilder ( 640 ) ; return EVAL_BODY_INCLUDE ; }
Determine the match for the RadioButtonGroup