Hi ,
Audit trails for some property names getting null for OOB model, written condition for checking properties using dictionaryServices but not getting properties names. I wrote substring condition for getting name with property definition. find the Java snippet:
Map propMap = (Map) o;
propMap.forEach((k, v) -> {
if (dictionaryService.getProperty((QName) k) != null) {
cell.append(dictionaryService.getProperty((QName) k).getTitle(dictionaryService) + " = " + v + "\n");
} else {
cell.append(k.toString().substring(k.toString().lastIndexOf("}") + 1, k.toString().length()) + v + "\n");
}
});
Mainly getting issue when I clicked document for edit offline at that time for some properties getting null. Find the below pictures for the issue:
Some properties are defined without a Title value in the Data Dictionary.
In this case, Working Copy Label property has no title defined:
You can include alternatively the Name instead of the Title.
Title attribute of property is not mandatory in content model of alfresco.So when you retrieve title of a property which does not exist , than it will return null.
cell.append(dictionaryService.getProperty((QName) k).getTitle(dictionaryService) + " = " + v + "\n");
You need to put if condition for title as well, If title is null than you can display the QNAME as it is or may be something else.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.