How to fix Primefaces resources being included multiple times?

Viewed 90

I'm migrating from Primefaces 6.1 to 7.0.18 at the moment one of my problems is related to Primeface somehow the resources for Primeface are now included multiple times within the generated HTML markup which delays the loading of the UI significantly and as well create a problem for file upload control open multiple time.

I just notice it happen due to primefaces.MOVE_SCRIPTS_TO_BOTTOM in Init Parameter.

Here is image for reference when primefaces.MOVE_SCRIPTS_TO_BOTTOM is not added

https://ibb.co/tzxMCZF

https://ibb.co/cb1YkZH

Is there any known solution to this problem other than ditching primefaces.MOVE_SCRIPTS_TO_BOTTOM completely? without primefaces.MOVE_SCRIPTS_TO_BOTTOM my UI shuffle.

  • Mojarra JSF 2.3
  • Primeface 7.0.18
  • JDK 8
  • Apache Tomcat 9.0.35
1 Answers

I am able to fix the issue. issue is I add <body> tags on template page and as well as on include page. once I avoid multiple body tag it's not include multiple time resources.

Related