@@ -399,7 +399,7 @@ private void addReturnValue() throws ScriptException {
399399 }
400400
401401 private <T > void addItem (final String name , final Class <T > type ,
402- final Map <String , Object > attrs ) throws ScriptException
402+ final Map <String , Object > attrs )
403403 {
404404 final DefaultMutableModuleItem <T > item =
405405 new DefaultMutableModuleItem <T >(this , name , type );
@@ -412,7 +412,7 @@ private <T> void addItem(final String name, final Class<T> type,
412412 }
413413
414414 private <T > void assignAttribute (final DefaultMutableModuleItem <T > item ,
415- final String k , final Object v ) throws ScriptException
415+ final String k , final Object v )
416416 {
417417 // CTR: There must be an easier way to do this.
418418 // Just compile the thing using javac? Or parse via javascript, maybe?
@@ -435,7 +435,7 @@ private <T> void assignAttribute(final DefaultMutableModuleItem<T> item,
435435 else if (is (k , "style" )) item .setWidgetStyle (as (v , String .class ));
436436 else if (is (k , "visibility" )) item .setVisibility (as (v , ItemVisibility .class ));
437437 else if (is (k , "value" )) item .setDefaultValue (as (v , item .getType ()));
438- else throw new ScriptException ( "Invalid attribute name: " + k );
438+ else item . set ( k , v . toString () );
439439 }
440440
441441 /** Super terse comparison helper method. */
0 commit comments