Skip to content

Commit

Permalink
Made the new account wizard work on a clone of the user manager
Browse files Browse the repository at this point in the history
  • Loading branch information
KlasJoensson authored and egonw committed Aug 11, 2012
1 parent 35f919e commit 8318ad1
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -84,8 +84,7 @@ public class EditUserDialog extends Dialog {
private Button showHidePassword;
private Table propertiesTable;
private List list;

private UserContainer sandBoxUserContainer;
private UserContainer sandBoxUserContainer, dummySandbox;
private EditUserDialogModel model;
private static final String[] COLUMN_NAMES = { "Property",
"Value",
Expand Down Expand Up @@ -243,7 +242,8 @@ public void widgetSelected(SelectionEvent e) {
* ADD ACCOUNT
*/
public void widgetSelected(SelectionEvent e) {
NewAccountWizard wizard = new NewAccountWizard(sandBoxUserContainer);
dummySandbox = sandBoxUserContainer.clone();
NewAccountWizard wizard = new NewAccountWizard(dummySandbox);
NewAcccountWizardDialog wd = new NewAcccountWizardDialog(
PlatformUI.getWorkbench()
.getActiveWorkbenchWindow()
Expand All @@ -266,11 +266,11 @@ public void widgetSelected(SelectionEvent e) {

DummyAccount da = new DummyAccount();
da.accountId = wizard.getAccountId();
da.accountType = sandBoxUserContainer.getAccountType( da.accountId );// wizard.getAccountType();
da.accountType = dummySandbox.getAccountType( da.accountId );
String key = "";
for( Property property : da.accountType.getProperties() ) {
key = property.getName();
da.properties.put(key, sandBoxUserContainer.getProperty( da.accountId, key ) );
da.properties.put(key, dummySandbox.getProperty( da.accountId, key ) );
}
model.dummyAccounts.put( da.accountId, da );

Expand All @@ -286,7 +286,7 @@ public void widgetSelected(SelectionEvent e) {
list.select(pos);
refreshTable();
refreshOnSelectionChanged();
}
}

}

Expand Down

0 comments on commit 8318ad1

Please sign in to comment.