Fórumok
liferay el variable isn't resolved
Pierluca Marino, módosítva 9 év-val korábban
liferay el variable isn't resolved
Junior Member Bejegyzések: 27 Csatlakozás dátuma: 2010.11.15. Legújabb bejegyzések
Hi,
After upgrading mojarra 2.1.29 and bridge 3.1.4 ga5 the liferay managed bean and used as el variable isn't resolved anymore. Trying to explain, in our portlet we user notation #{liferay.user.locale} to pass current liferay user locale to primefaces calendar tag. Es:
Now after upgrading #{liferay.user.locale} return empty value, but neither #{liferay.user} and #{liferay} return empty values.
Thanks for any help.
Pierluca
P.S. We user Liferay 6.1.3 ga3
After upgrading mojarra 2.1.29 and bridge 3.1.4 ga5 the liferay managed bean and used as el variable isn't resolved anymore. Trying to explain, in our portlet we user notation #{liferay.user.locale} to pass current liferay user locale to primefaces calendar tag. Es:
<p:calendar id="idDataRicercaDal" value="#{toDoListLogModelBean.dataLogDa}" showon="button" pattern="#{m3i18n['formato.data.default']}" styleclass="m3CalendarVerdeObbligatorio" showothermonths="true" selectothermonths="true" converter="#{XmlGregorianCalendarConverter}" disabledweekends="true" binding="#{idDataRicercaDal}" locale="#{liferay.user.locale}" navigator="true" yearrange="#{m3i18n['range.anni.calendario.futuro']}"></p:calendar>
Now after upgrading #{liferay.user.locale} return empty value, but neither #{liferay.user} and #{liferay} return empty values.
Thanks for any help.
Pierluca
P.S. We user Liferay 6.1.3 ga3
Neil Griffin, módosítva 9 év-val korábban
RE: liferay el variable isn't resolved
Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
Hi Pierluca,
If I remember correctly, the User.getLocale() method returns the locale that has been saved by the user when he edits his profile. If I am correct, then perhaps the user has not saved a different locale from his profile?
Are you trying to determine the current locale? That should be set automatically for you by the LiferayLocalePhaseListener, which gets the user's locale from the ThemeDisplay and sets it in the ViewRoot.
Kind Regards,
Neil
If I remember correctly, the User.getLocale() method returns the locale that has been saved by the user when he edits his profile. If I am correct, then perhaps the user has not saved a different locale from his profile?
Are you trying to determine the current locale? That should be set automatically for you by the LiferayLocalePhaseListener, which gets the user's locale from the ThemeDisplay and sets it in the ViewRoot.
Kind Regards,
Neil
Pierluca Marino, módosítva 9 év-val korábban
RE: liferay el variable isn't resolved
Junior Member Bejegyzések: 27 Csatlakozás dátuma: 2010.11.15. Legújabb bejegyzések
Hi Neil,
Now i get locale from object ViewRoot:
Now i get locale from object ViewRoot:
<p:calendar id="calendarioRicerca" value="#{toDoListModelBean.dataRicercaAl}" showon="button" pattern="#{m3i18n['formato.data.default']}" styleclass="m3CalendarVerde" showothermonths="true" selectothermonths="true" converter="#{XmlGregorianCalendarConverter}" disabledweekends="true" binding="#{calendarioRicerca}" locale="#{view.locale.language}" < code></p:calendar>
<br><br>and it works.<br><br>Thank you very much.<br><br>Pierluca
Neil Griffin, módosítva 9 év-val korábban
RE: liferay el variable isn't resolved
Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
Hi Pierluca,
I'm glad it is working for you now. Alternatively you can use #{liferay.themeDisplay.locale}
Kind Regards,
Neil
I'm glad it is working for you now. Alternatively you can use #{liferay.themeDisplay.locale}
Kind Regards,
Neil