DefaultListItem retainPermissionsListItem = new DefaultListItem( Messages.getString( "retainPermissions" ) );
retainPermissionsListItem.setValue( "true" );
filePermissionsDropDown.addItem( retainPermissionsListItem ); // If selected set "overwriteAclPermissions" to
// true.
final ChangeListener filePermissionsHandler = new ChangeListener() {
@Override
public void onChange( Widget sender ) {
String value = filePermissionsDropDown.getSelectedItem().getValue().toString();
applyAclPermissions.setValue( Boolean.valueOf( value ) );
applyAclPermissions.setFormValue( value );
overwriteAclPermissions.setFormValue( value );
overwriteAclPermissions.setValue( Boolean.valueOf( value ) );
setRetainOwnershipState();
}
};
filePermissionsDropDown.addChangeListener( filePermissionsHandler );
filePermissionsDropDown.setVisibleRowCount( 1 );
disclosureContent.add( filePermissionsDropDown );
spacer = new VerticalPanel();
spacer.setHeight( "4px" );
disclosureContent.add( spacer );
HTML fileOwnershipLabel = new HTML( Messages.getString( "fileOwnership" ) );
fileOwnershipLabel.setStyleName( "gwt-Label" );
disclosureContent.add( fileOwnershipLabel );
retainOwnershipDropDown.addChangeListener( new ChangeListener() {
@Override
public void onChange( Widget sender ) {
String value = retainOwnershipDropDown.getSelectedItem().getValue().toString();
retainOwnership.setValue( value );
}
} );
DefaultListItem keepOwnershipListItem = new DefaultListItem( Messages.getString( "keepOwnership" ) );
keepOwnershipListItem.setValue( "true" );
retainOwnershipDropDown.addItem( keepOwnershipListItem );
DefaultListItem assignOwnershipListItem = new DefaultListItem( Messages.getString( "assignOwnership" ) );
assignOwnershipListItem.setValue( "false" );
retainOwnershipDropDown.addItem( assignOwnershipListItem );
retainOwnershipDropDown.setVisibleRowCount( 1 );
disclosureContent.add( retainOwnershipDropDown );
spacer = new VerticalPanel();
spacer.setHeight( "4px" );
disclosureContent.add( spacer );
ChangeListener overwriteFileHandler = new ChangeListener() {
@Override
public void onChange( Widget sender ) {
String value = overwriteFileDropDown.getSelectedItem().getValue().toString();
overwriteFile.setValue( value );
}
};
overwriteFileDropDown.addChangeListener( overwriteFileHandler );
HTML loggingLabel = new HTML( Messages.getString( "logging" ) );
loggingLabel.setStyleName( "gwt-Label" );
disclosureContent.add( loggingLabel );
final CustomListBox loggingDropDown = new CustomListBox();
loggingDropDown.addChangeListener( new ChangeListener() {
public void onChange( Widget sender ) {
String value = loggingDropDown.getSelectedItem().getValue().toString();
logLevel.setValue( value );
}
} );