Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2926

PrimeFaces core.js throws JavaScript TypeError: "localeKey is undefined" after ajax navigation when PRIMEFACES_MOBILE RenderKit is used



      Steps to reproduce:

      1. Deploy and navigate to the primefaces-applicant-portlet.
      2. Fill out and submit the form.
      3. Click the Submit another application button.

      If the bug still exists, the a JavaScript error like the following will appear in the browser console logs:

      > TypeError: localeKey is undefined

      If the bug is fixed, the JavaScript error will not appear.

      This issue is likely due to PrimeFaces Dynamic Resource Loading. It is due to the fact that components.js is loaded when ajax navigation occurs. components.js is suppressed by PrimeFaces Mobile HeadRenderer on a full page GET. However, PrimeFaces PrimePartialResponseWriter does not suppress it on ajax navigation. The JavaScript error does not appear when running in a webapp. However components.js is still incorrectly loaded in a webapp, so perhaps this issue would be better fixed in PrimeFaces.


      To workaround this issue, avoid using ajax navigation.

      To workaround this issue, include components.js (target="head") in the view which you are navigating from (the initial view):

      <h:outputScript library="primefaces" name="components.js" target="head" />

      To workaround this issue, only use p:commandButton for ajax navigation in PrimeFaces applications.




            • Assignee:
              kyle.stiemann Kyle Stiemann
              kyle.stiemann Kyle Stiemann
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: