New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OutputPanel: deferred mode defect #7953
Comments
i will close this issue here as this is not for elite-only bugs and we cant even fix it If you need this fix, you can also use PrimeFaces PRO to sponsor the fix for the next elite release |
Who do I have to write to so that this is reported as a bug and possibly fixed? For me, the elite account makes no sense if components suddenly no longer work and I have to become a pro user in order to be able to use a functioning Primefaces. That sounds like a rip-off and that wasn't what Primefaces used to be. |
maybe it would be make sense to create a private issue tracker for elite like for PRO |
So I am confused @StevenHachel Did it work on 8.0 and broke in 8.0.X elite or is it broken in 8.0 Community too? |
@melloware The Class
In version 5/6/7, only The construct was extended by the method: That is what causes the problem. What do I have to configure and how so that it works as usual under PF 8? |
Oh its easy just Extend OutputPanelRenderer and override that Then in you faces-config.xml just plug the renderer in. <render-kit>
<renderer>
<component-family>org.primefaces.component</component-family>
<renderer-type>org.primefaces.component.OutputPanelRenderer</renderer-type>
<renderer-class>com.yourcompany.MyOutputPanelRenderer</renderer-class>
</renderer>
</render-kit> |
@melloware In my example you can see that it no longer works due to your conversion. You're the experts, I'm just the one looking at the code. 😁 |
@melloware Steven |
Hey, When this workaround is active, then breaking the <p: ajaxStatus /> oncomplete state. :-( This is then simply no longer triggered. |
@StevenHachel You are still talking about 8.0.13? |
@jepsar Primefaces 8.0.14 :-) |
Hello, Some pages take a really, really long time to load without this option and it's annoying that it doesn't work anymore. Please excuse my question.
|
Either get PRO support (https://github.com/primefaces/primefaces#community--elite--pro) or upgrade to PF 12 (RC was released yesterday). |
Defect since PF 8! Primefaces was the top 1 framework for us at the time because it had this lazy loading feature. Now you just removed it without officially mentioning it. Have now spent two days migrating our business project to Primefaces 12. Had to find out that it is still defective. If only I had tested first instead of relying on the statement. :( Attached is the test project with PF 12.0.0.RC. It still does not work.
|
@StevenHachel looks like Thomas is investigating but I don't understand why overriding the Renderer to put the code back the way it was in 7 stopped working for you? |
@melloware i would check it this week, if you have more time, you can also do it now :) |
I will look into it! |
@StevenHachel here is the PrimeFaces 12 way of doing it and its much better user experience that people are familiar with from Facebook and GitHub known as a "Skeleton". Try my reproducer and see what you think... |
If I'd know that. You have to find out why that is. You are the specialists and I have trusted in your skills for 15 years! :-) |
@StevenHachel I have an even easier solution for you. Just add <p:outputPanel deferred="true" loaded="false"> and if you want to set that property on ALL output panels in your app simply follow these instructions to turn it on globally: https://primefaces.github.io/primefaces/11_0_0/#/core/globalattributes?id=global-attributes |
I will test it tomorrow. Thanks for your support. :-) Steven |
I see that it works fine in the simple test application. We use the outputPanel component mainly for datatables (editable, etc.) and critical areas that take a long time to load, which also use many clientRemote functions to perform certain actions. It doesn't really work anymore. I keep thinking about going back to PF 7 again. Always going to the latest version is always a small risk for us, since Primefaces does not always work perfectly in the new versions. All the changes have to be tested somehow and you always change a lot in the new PF versions. :) But before that I test the "Skeleton" (only PF 12?) option again. Steven |
Please do keep your application up to date. There are many fixes between versions of which some might be security fixes. If any issues arise, please report them (better for everyone). There is a large and growing number of integration tests which should prevent regression. If there is a certain feature which is critical for you, and there is no integration test for that yet, you can always open a pull request to add such a test. And please read https://github.com/primefaces/primefaces#community--elite--pro |
@StevenHachel echoing what @jepsar said but also I just tried the MyOutputRenderer trick and it works on Mojarra and MyFaces and I tried it in Wildfly, Tomee, and straight Jetty and its working fine. See this reproducer: pf-7953-renderer.zip So I think you need to investigate to make sure your faces-config.xml is actually being picked up properly to override the renderer. |
@melloware I'll take another look at why it's not working for me. As I said, it worked under JavaEE6, but since the switch to JavaEE8 and Payara 5, the Ajax status is no longer set to "complete" due to this change. I'm trying to write an example. Thanks for the help! Steven Edit: I now see why the Ajax "complete" event is not being fired. |
please just provide a sample, what is not working for you within a primefaces-test project |
@StevenHachel agreed with Thomas it works just fine in my PF TEst reproducer and makes it work just like PF7 used to so you have something else going on with your custom code. |
hey everyone, Attached is a small sample project, which is similar to our business project in terms of navigation. It consists of many decoupled modules that are deployed via Maven as required. I somehow tried to recreate it roughly and didn't find any errors until in the last step I simply changed the javax.faces version to 2.3.9 under the "Mojarra22" profile, since under JavaEE8 (and Payara 5) JSF 2.3.x is used. Then the error appears that paralyzes the entire JavaScript ecosystem. Please just click on the "stammdaten" link and call up the console with F12 (Firefox). If "MyOutputPanelRenderer" is deactivated, this error does not appear, or with javax.faces version 2.2.x. Steven |
Still can't reproduce:
Works with all versions of MyFaces and Mojarra tested including both 2.3.9 that you report as not working and 2.3.18 which is latest Mojarra 2.3.X. Tested on Firefox and Chrome. |
So the context is started with Mojara version 2.3.9 (javax.faces, NOT jakarta.faces) and no error can be seen in the console when you click on "stammdaten"? Possibly change the size of the console (Firefox) once so that the error also appears there. So only open it after you click on it. |
Is this the error you see in Firefox: If so as I suspected its your code. Your menu is generating this... <a id="leftSiteMenuForm:j_id_w:j_id_x:j_id_y_1_3" href="#" class="ui-commandlink ui-widget" aria-label="" onclick="return false;;PrimeFaces.ab({s:"leftSiteMenuForm:j_id_w:j_id_x:j_id_y_1_3",f:"leftSiteMenuForm",u:"leftSiteMenuForm:leftSiteMenuPanel merlinMainContent",ps:true});return false;" style="margin-left: 12px !important; font-size: 12px !important; font-weight: bold; color: #2699d1; font-size: 11px !important">stammdaten</a> Basically So its your code I don't think it has anything to do with Mojarra or the MyOutputRenderer etc. it looks like its related to this stuff: onclick="#{cc.attrs.controller.isCurrentApplicationModuleComponentDesciption(itemTool) ? 'return false;' : ''}" |
Thx for Info! :-) I will test it without the "return flag". |
OK I just got it. In Firefox i have to resize the browser to trigger the error! |
OK this turned out to be a PFE Layout bug I opened it here: primefaces-extensions/primefaces-extensions#902 I attached a fixed reproducer so you can see it working! I added a Monkeypatch in your HussCommon.js file. |
Thanks for the patch, but it doesn't really solve the problem. There is no longer an exception, but all other JavaScript functions such as
But thanks for the trouble, I'll have to see if I can get Payara to work with Mojarra 2.2.x, which will probably be difficult. Anyway, I'm glad you realized there was a problem. :) Steven |
Hello, I've added another example without Primefaces Extensions layout and also added a debugger DIV, for example to monitor the AjaxStatus. As you can see, after clicking on the "stammdaten" link, no more AjaxStatus is triggered. If I skip the click on the "stammdaten", you can see that it works perfectly. If I switch to Mojarra version 2.2.x (within the POM under profile mojarra22 (javax.faces)) or remove the CustomRenderer in the faces-config, the OutputPanel no longer works, but there is no problem with the AjaxStatus, for example. There is definitely still a problem in interaction with Mojarra 2.3.x (javax.faces). pf-7953-renderer_mojarra_2.3.9_problem_without_extension_layout.zip |
i think your problem is the same as: #8838
loaded=false was discussed above and you can remove your overwritten renderer. we may switch to async=false to avoid such problems, see: #9055 |
It works! With and without Layout! Many many thx! Steven |
<p:outputPanel deferred="true">
dosent work under PrimeFaces 8.0.x.
This is very very bad for my migrated Company software.
All pages cant loaded in lazy mode. Only refresh this Application with F5 shows a working outpurPanel.
The loading of new components or the refreshing of components with complex database queries no longer works via command buttons, navigation bars etc. in lazylaoding mode via the output panel.
This is really very, very critical for us.
Pleace fix this bug. Pleace! :-(
We cannot switch to Primefaces 10/11 so quickly because we are too small a team. This problem did not exist under Primefaces 4/5/6/7.
primefaces-test--outputpanel-bug-8.0.zip
Profile: mojarra22
The text was updated successfully, but these errors were encountered: