+ permType
+ "] for:</b>" ) ); // NON-NLS
for ( int i = 0; i < permList.size(); i++ ) {
final String p = permList.get( i );
ImageButton del = new ImageButton( GuvnorImages.INSTANCE.DeleteItemSmall(),
ConstantsCore.INSTANCE.RemovePermission(),
new ClickHandler() {
public void onClick(ClickEvent w) {
if ( Window.confirm( ConstantsCore.INSTANCE.AreYouSureYouWantToRemovePermission0( p ) ) ) {
permList.remove( p );
if ( permList.size() == 0 ) {
perms.remove( permType );
}
doPermsPanel( perms,
vp );
}
}
} );
g.setWidget( i + 1,
1,
new SmallLabel( p ) );
g.setWidget( i + 1,
2,
del );
}
vp.add( g );
}
}
// now to be able to add...
ImageButton newPermission = new ImageButton( GuvnorImages.INSTANCE.NewItem(),
ConstantsCore.INSTANCE.AddANewPermission(),
createClickHandlerForNewPersmissionImageButton( perms,
vp ) );
vp.add( newPermission );
return vp;