getMessage in UI page not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 12:34 AM
HI Administration All,
I have modified OOB UI page "assessment_take2" as per user requirement. This was for adding custom translations for a message. Code is like below :
<j2:if test="$[GlideMobileExtensions.getDeviceType() == 'doctype']">
<div class="notification notification-info">
<j2:if test ="${task_table=='Incident'}">
$[gs.getMessage('incident_survey_msg')]
</j2:if>
<a onClick="openTaskOverlay(event)" class="related-task-link">${gs.getMessage('${task_record}')}</a>
<button data-dismiss="alert" class="btn btn-icon close icon-cross">
<span class="sr-only">Close</span>
</button>
</div>
</j2:if>
The above getMessage is not working for other languages except English after adding the <j2:if test ="${task_table=='Incident'}"> condition. For english, message is showing up. I have added translations already in messgae table but it is not working Any help is highly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 04:43 AM
Hi Sri Varts,
Can you provide additional details? What is the user language preference? & are you using the OOB assessment_take2 UI page?
Many Thanks,
Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 12:57 AM
Hi All,
Thank you so much for the support! My issue is now resolved. Messages are coming for different languages.
Issue is not with the if condition but with the task_table. Initially, it is storing "Table Display Value".
task_table=getClassDisplayValue();
<j2:if test ="$[task_table=='incident']">
When language is English, Display value is "Incident". Hence it was going into if loop & picking up. But when language is changed (EG: German) display value is changed to "Vorfall" As it is not matching, it is not going inside the loop & message is not picked up.
Now I updated it to "task_table = tr.getTableName();" It fetches the table name "incident" always & it's working perfectly