updated get all contact. Now the method doesn't return user with empty name
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@77019 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
682558664a
commit
847c4ae1e8
|
@ -127,9 +127,9 @@ public class MultiDragContact extends Dialog {
|
||||||
StoreFilterField<InfoContactModel> filter = new StoreFilterField<InfoContactModel>() {
|
StoreFilterField<InfoContactModel> filter = new StoreFilterField<InfoContactModel>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean doSelect(Store<InfoContactModel> store, InfoContactModel parent,
|
protected boolean doSelect(Store<InfoContactModel> store,
|
||||||
InfoContactModel record, String property, String filter) {
|
InfoContactModel parent, InfoContactModel record,
|
||||||
|
String property, String filter) {
|
||||||
|
|
||||||
String name = record.getName();
|
String name = record.getName();
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
|
@ -172,9 +172,9 @@ public class MultiDragContact extends Dialog {
|
||||||
StoreFilterField<InfoContactModel> filter2 = new StoreFilterField<InfoContactModel>() {
|
StoreFilterField<InfoContactModel> filter2 = new StoreFilterField<InfoContactModel>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean doSelect(Store<InfoContactModel> store, InfoContactModel parent,
|
protected boolean doSelect(Store<InfoContactModel> store,
|
||||||
InfoContactModel record, String property, String filter) {
|
InfoContactModel parent, InfoContactModel record,
|
||||||
|
String property, String filter) {
|
||||||
|
|
||||||
String name = record.getName();
|
String name = record.getName();
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
|
@ -260,11 +260,13 @@ public class MultiDragContact extends Dialog {
|
||||||
gridAllContacts.mask("", ConstantsExplorer.LOADINGSTYLE);
|
gridAllContacts.mask("", ConstantsExplorer.LOADINGSTYLE);
|
||||||
if(listContact!=null && listContact.size()>0){
|
if(listContact!=null && listContact.size()>0){
|
||||||
|
|
||||||
for (InfoContactModel infoContactModel : listContact) {
|
// for (InfoContactModel infoContactModel : listContact) {
|
||||||
|
//
|
||||||
|
// if(infoContactModel.getName()!=null && !infoContactModel.getName().isEmpty())
|
||||||
|
// storeSource.add(infoContactModel);
|
||||||
|
// }
|
||||||
|
|
||||||
if(infoContactModel.getName()!=null && !infoContactModel.getName().isEmpty())
|
storeSource.add(listContact);
|
||||||
storeSource.add(infoContactModel);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
gridAllContacts.unmask();
|
gridAllContacts.unmask();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1493,7 +1493,12 @@ public class GWTWorkspaceBuilder {
|
||||||
List<InfoContactModel> listContactsModel = new ArrayList<InfoContactModel>();
|
List<InfoContactModel> listContactsModel = new ArrayList<InfoContactModel>();
|
||||||
|
|
||||||
for(User user: listUsers){
|
for(User user: listUsers){
|
||||||
listContactsModel.add(new InfoContactModel(user.getId(), user.getPortalLogin(), UserUtil.getUserFullName(user.getPortalLogin())));
|
String fullName = UserUtil.getUserFullName(user.getPortalLogin());
|
||||||
|
|
||||||
|
if(fullName!=null && !fullName.isEmpty())
|
||||||
|
listContactsModel.add(new InfoContactModel(user.getId(), user.getPortalLogin(), fullName));
|
||||||
|
else
|
||||||
|
logger.trace("buildGXTListContactsModel doesn't return user: "+user.getPortalLogin()+ "because name is null or empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
return listContactsModel;
|
return listContactsModel;
|
||||||
|
|
Loading…
Reference in New Issue