[ http://jira.andromda.org/browse/BPM-236?page=comments#action_11914 ] Bobby Peterson commented on BPM-236: ------------------------------------
After removing the @andromda.struts.view.field.radio=3 and trying to let it default to 3, it generated the method like the following: Which compiles but won't work. /** * Converts the selected option index to the corresponding value as it was modeled. */ public int getSelectTypeOptionValue(int optionIndex) { switch(optionIndex) { default: throw new java.lang.ArrayIndexOutOfBoundsException( "Cannot access option "+optionIndex+", please specify a value in the range [0-$optionIndex]"); } } > radio button code generation > ---------------------------- > > Key: BPM-236 > URL: http://jira.andromda.org/browse/BPM-236 > Project: Bpm4Struts Cartridge > Type: Bug > Versions: 3.1 > Environment: Windows XP Pro, JDK 1.5, ANT 1.6.5, > Reporter: Bobby Peterson > Assignee: Wouter Zoons > Priority: Critical > > I recently upgraded from 3.0 to 3.1 SNAPSHOT. > There seems to be an issue with the code generation from a radio button. > When the dataType is "int" and the type is radio and I set > @andromda.struts.view.field.radio=3 It generates code that does not compile. > In the XXXFormImpl class. > The following is the new code that was generated that doesn't compile. > /** > * Converts the selected option index to the corresponding value as it > was modeled. > */ > public int getSelectTypeOptionValue(int optionIndex) > { > switch(optionIndex) > { > case 0 : return new int("selectType-1"); > case 1 : return new int("selectType-2"); > case 2 : return new int("selectType-3"); > default: > throw new java.lang.ArrayIndexOutOfBoundsException( > "Cannot access option "+optionIndex+", please specify a > value in the range [0-2]"); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Andromda-devel mailing list Andromda-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-devel