Skip to content
This repository has been archived by the owner on Nov 12, 2020. It is now read-only.

Commit

Permalink
Fix AS7-1733
Browse files Browse the repository at this point in the history
  • Loading branch information
heiko-braun committed Sep 15, 2011
1 parent c17d941 commit e0174d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ public void onSuccess(DMRResponse result) {
records.add(record);
}

// early initialization
if(records.size()>0)
currentProfile.setName(records.get(0).getName());

callback.onSuccess(records);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ public Widget asWidget() {
}

private void fireProfileSelection(String name) {
Console.MODULES.getEventBus().fireEvent(new ProfileSelectionEvent(name));
Console.MODULES.getEventBus().fireEvent(new ProfileSelectionEvent(name));
}

public void updateProfiles(final List<ProfileRecord> profileRecords) {

final String prevSelected = profileSelection.getSelectedValue();

profileSelection.clearValues();

for(ProfileRecord record : profileRecords)
Expand All @@ -85,19 +87,16 @@ public void updateProfiles(final List<ProfileRecord> profileRecords) {
public void execute() {

int selectedIndex = 0;
for(int i=0; i<profileSelection.getItemCount(); i++)
if(prevSelected!=null && !prevSelected.equals(""))
{
if("preview-base".equals(profileSelection.getValue(i))) // domain-preview.xml
{
selectedIndex=i;
break;
}
else if("web-base".equals(profileSelection.getValue(i))) // domain.xml
for(int i=0; i<profileSelection.getItemCount(); i++)
{
selectedIndex=i;
break;
if(prevSelected.equals(profileSelection.getValue(i)))
{
selectedIndex=i;
break;
}
}

}

profileSelection.setItemSelected(selectedIndex, true);
Expand Down

0 comments on commit e0174d1

Please sign in to comment.