cancel
Showing results for 
Search instead for 
Did you mean: 

TextAttributeValueProperties.getToolTip() returns null when it have one

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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