Hi All,
We are using Vignette Portal.
We have a scenario where we are creating a language property under Portlet Type. This language property needs to be available for each of the portlet instances and will have same value for the given locale for each instance as it is defined in the Type and NOT in Portlet instance (This is expected).
To retrieve this property, we are trying following in the view jsp of Portlet Type.
Retrieving PortletTypeUID
JSPView _currentview = (JSPView)request.getAttribute("view");
String portletFrId = _currentview.getBean().getStringID();
String portletTypeUID = "";
Portlet currentPortlet = PortletManager.getInstance().getPortletByFriendlyID(portletFrId);
if(currentPortlet!=null){
portletTypeUID = currentPortlet.getPortletType().getUID();
}
And then retrieving the property using portletTypeUID in below 2 ways
- <%=I18nUtils.getValue(portletTypeUID, "myKey", "defaultKeyValue",request)%>
- <vgn-portal:i18nValue stringID="<%=portletTypeUID%>" key="myKey" defaultValue="defaultKeyValue" />
However, in both the ways, it is printing "defaultKeyValue" and not the actual value in the language property of the Portlet Type.
Can you please guide if this is correct way of doing it OR we are missing something here?
Thanks,
Ronak