Search code examples
extjsliferay

ExtJS with Spring app conversion 6.2 to 7.1 duplicate Javascript objects


i am relatively new to ExtJS so any information would be most appreciated. additionally any sources where i can read up on my particular case.

we have an ExtJS app with a Spring mid that was recently converted from 6.2 to 7.1. i was informed that we had to create three, one column widget pages and configure each of those to the correct "View Type". the app does function so far as advertised. the issue though is that after the inital load of any of the pages then all subsequent page changes withint the app provide "schema has already been defined" and "duplicate id" javascript errors. it seems as though the portlet keeps trying to load the same objects over again and so the page does not load.

is there some setting in Liferay that will affect this? is this some architectual issue? again, the app did not display this behavior in Liferay 6.2.

please let me know if i am on the right track with this.

thanks again.


Solution

  • This is probably very much related to this question (though not exactly a duplicate), and a result of the SPA (Single Page Application) Framework being active by default starting on Liferay 7. The answer that I'm linking documents one option that you have, which most likely comes from Liferay's documentation.

    Find the code in the linked answer. The basic reason is: The page is never reloaded, thus you'll find unexpected leftover elements still there. Liferay 6.x didn't have a SPA framework, but used full page reloads.