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
05-18-2017 02:21 AM
It seems like the if condition could be an issue "<j2:if test ="${task_table=='Incident'}">". It is phase 2 parsing you should use "<j2:if test ="$[task_table=='Incident']">
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 02:54 AM
I tried this but no luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 02:43 AM
Hi Kiranmai,
can you try the below code this is helpful for you..
<j:set var="jvar_target_table" value="${RP.getWindowProperties().get('target_table')}" />
<j:if test="${RP.getWindowProperties().get('target_table') == 'incident'}">
<p>${gs.getMessage('incident_survey_msg')}</p>
</j:if>
PS: Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2017 02:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2017 04:06 AM
Hi Kiran,
Hi. I am facing some issue regarding to message in UI Page.. For one specific user, the above message "This survey is in regards ---" is not getting displayed. Any idea why is it happening?