private static boolean toBoolean ( String value , boolean defaultValue ) { if ( value == null || value . trim ( ) . length ( ) == 0 ) return defaultValue ; try { return Caster . toBooleanValue ( value . trim ( ) ) ; } catch ( PageException e ) { return defaultValue ; } }
cast a string value to a boolean