on 02-09-2009 6:21 PM
hey guys ,
i have a problem when i try to execute the code below, in Data Manager i can see the taxonomy tooltip but when i try to get it using MDM Api it returns null.
RetrieveAttributeCommand attr = new RetrieveAttributeCommand(conn);
attr.setSession(userSession);
attr.setAttributeId(attrId);
attr.setTaxonomyTableId(tableId);
attr.execute();
TextAttributeProperties attrsProp = (TextAttributeProperties) attr.getAttribute();
// Setear valores comunes en el dto
dto.setName(attrsProp.getName().get(getRegionCode(control)));
dto.setAlias(attrsProp.getAlias().get(getRegionCode(control)));
dto.setDefinition(attrsProp.getDefinition().get(getRegionCode(control)));
dto.setId(attrsProp.getId().getIdValue());
dto.setPriority(attrs<i>.getPriority());
//cargo valores posibles para el atributo
TextAttributeValueProperties [] tavp = attrsProp.getTextAttributeValues();
int size = tavp.length;
FeatureValueDTO[] fvs = new FeatureValueDTO[size];
for (int j= 0; j<size ;j++) {
FeatureValueDTO fvdto = new FeatureValueDTO();
fvdto.setId(tavp[j].getId().getIdValue());
fvdto.setName(tavp[j].getName().get(getRegionCode(control)));
fvdto.setDescription(tavp[j].getTooltip().get(getRegionCode(control)));
fvs[j] = fvdto;
}
I can see correct ID and Name but not Description, i have to set anything up to get the tooltip ?
Tks
Hi,
It seems , you are following appropriate approach;
When RegionCode is not appropriate, you wont get it anything except null value;
so , primarily make sure that you use right region code and that should be predefined one in MDM
Server,
secondly, There might not be tool tip value at server;
any way , why dont you try with just get() method ( not with any region code), so that , you will come to
know where is the mistake going on;
you need to use RegionProperties class to get correct RegionCode;
I followed as follows
temp=values.getTooltip().get(rProps.getRegionCode());
if(temp==null)temp=values.getTooltip().get();
textAttributeValue<i>.setToolTip(temp);
Regards
Rajasekhar K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.