public void setOccurrences ( String occurrences ) { int o = CmsSerialDateUtil . toIntWithDefault ( occurrences , - 1 ) ; if ( m_model . getOccurrences ( ) != o ) { m_model . setOccurrences ( o ) ; valueChanged ( ) ; } }
Set the occurrences . If the String is invalid the occurrences will be set to - 1 to cause server - side validation to fail .