Source:
<code>public AdElementListModel() { setRole(new ListModel()); setProfile(new ListModel()); setNamespace(new ListModel()); setSelectAll(new EntityModel()); getSelectAll().setEntity(false); getSelectAll().getEntityChangedEvent().addListener(this); setIsRoleListHiddenModel(new EntityModel()); getIsRoleListHiddenModel().setEntity(false); setIsEveryoneSelectionHidden(new EntityModel()); getIsEveryoneSelectionHidden().setEntity(false); setSearchInProgress(new EntityModel()); getSearchInProgress().setEntity(false); setIsTimerDisabled(true); AsyncDataProvider.getInstance().getAAAProfilesEntriesList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { populateProfiles((List<ProfileEntry>) result); getProfile().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { <START> getNamespace().setItems(namespacesMap.get(((ProfileEntry) getProfile().getSelectedItem()).getAuthz())); <END> } }); } })); AsyncDataProvider.getInstance().getAAANamespaces(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { namespacesMap = (HashMap<String, List<String>>) result; List<String> selectedNamespaces = namespacesMap.get(((ProfileEntry) (getProfile().getSelectedItem())).getAuthz()); getNamespace().setItems(selectedNamespaces); getNamespace().setSelectedItem(selectedNamespaces.get(0)); } })); AsyncDataProvider.getInstance().getRoleList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { populateRoles((List<Role>) result); } })); }</code><technical_language>Please check if 'namespacesMap != null'. is progress in this dialog. A scenario user changed selected profile item AAANamespaces query returned happen</technical_language>

Target:
public AdElementListModel() { setRole(new ListModel()); setProfile(new ListModel()); setNamespace(new ListModel()); setSelectAll(new EntityModel()); getSelectAll().setEntity(false); getSelectAll().getEntityChangedEvent().addListener(this); setIsRoleListHiddenModel(new EntityModel()); getIsRoleListHiddenModel().setEntity(false); setIsEveryoneSelectionHidden(new EntityModel()); getIsEveryoneSelectionHidden().setEntity(false); setSearchInProgress(new EntityModel()); getSearchInProgress().setEntity(false); setIsTimerDisabled(true); AsyncDataProvider.getInstance().getAAAProfilesEntriesList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { populateProfiles((List<ProfileEntry>) result); getProfile().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if (namespacesMap != null) { populateNamespaces(namespacesMap.get(((ProfileEntry) getProfile().getSelectedItem()).getAuthz())); } } }); } })); AsyncDataProvider.getInstance().getAAANamespaces(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { if (getProfile().getSelectedItem() != null) { namespacesMap = (HashMap<String, List<String>>) result; List<String> selectedNamespaces = namespacesMap.get(((ProfileEntry) (getProfile().getSelectedItem())).getAuthz()); populateNamespaces(selectedNamespaces); } } })); AsyncDataProvider.getInstance().getRoleList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object result) { populateRoles((List<Role>) result); } })); }