public void onClick( ClickEvent event ) { if ( Window.confirm( Constants.INSTANCE.RemoveThisRuleOption() ) ) { model.removeAttribute( idx ); parent.refreshWidget(); } } } );
@Test public void testAttributes() { final RuleModel m = new RuleModel(); final RuleAttribute at = new RuleAttribute( "salience", "42" ); m.addAttribute( at ); assertEquals( 1, m.attributes.length ); assertEquals( at, m.attributes[0] ); final RuleAttribute at2 = new RuleAttribute( "agenda-group", "x" ); m.addAttribute( at2 ); assertEquals( 2, m.attributes.length ); assertEquals( at2, m.attributes[1] ); m.removeAttribute( 0 ); assertEquals( 1, m.attributes.length ); assertEquals( at2, m.attributes[0] ); } /*