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
SelectCheckboxMenu selected items not consistent with checkboxes in Firefox Quantum #2959
Comments
Is this only in Firefox or does it happen in Chrome/IE/Edge? |
Only in Firefox Quantum (57.x) |
Firefox cache the input by default for some reason so you probably need to set If you press Ctrl + Shift + R in Firefox quantum, the checkbox value won't persist. |
I use OmniFaces cachcontrol filter... <!-- No Cache Filter -->
<filter>
<filter-name>NoCacheFilter</filter-name>
<filter-class>org.omnifaces.filter.CacheControlFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>NoCacheFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> |
Good resources 👍 . I was always using a custom servlet response to write the flag back. Looks like omnifaces can do the job without any code overhead. |
I just use this in my templates:
|
I actually use a bunch of Omnifaces filters that are awesome... <!-- UTF-8 Encoding filter over the default ISO-8859-1. -->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.omnifaces.filter.CharacterEncodingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Apply GZIP compression on responses whenever applicable -->
<filter>
<filter-name>GzipResponseFilter</filter-name>
<filter-class>org.omnifaces.filter.GzipResponseFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GzipResponseFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- No Cache Filter -->
<filter>
<filter-name>NoCacheFilter</filter-name>
<filter-class>org.omnifaces.filter.CacheControlFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>NoCacheFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- adds an exception handler to unwrap exceptions in EL and regular page requests -->
<filter>
<filter-name>FacesExceptionFilter</filter-name>
<filter-class>org.omnifaces.filter.FacesExceptionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>FacesExceptionFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping> |
Just my thoughts:
|
So, this issue is on showcase for not setting the flag properly I guess. On the other hand, Firefox's caching system is a bit aggressive compared to other major browsers IMHO as they have been tried to do a lot of things to boost the performance in the latest release. |
Yep @xxiFear you can close this issue I have opened an issue on the Showcase to set the caching. |
@melloware, @jxmai, @tandraschko Thank you very much for the help. |
I just tried your suggestion @tandraschko and it somehow still does not work in Firefox. Apart from that, it says "wrong attribute value" on all three meta tags. |
Yep, i see. Seems like these tags are not 100% safe to use and a fitler is the only 100% working approach. |
@melloware You should change your showcase issue then. |
Agreed. I will kill my PR and submit a different one. |
1) Environment
->Does not work on Primefaces Showcase
2) Expected behavior
Loading a page with a selectCheckboxMenu shows all items and - if selected items are prefilled - the checked checkbox.
3) Actual behavior
Prefilled selected items do get added as label to a "multi" checkboxMenu but regardless of the checkboxMenu mode (single, multi...) the checkboxes in the dropdown menu are not consistent. Instead, they show the last state before reloading the page. (Seems like they get chached somehow)
4) Steps to reproduce
5) Sample XHTML
6) Sample bean
The text was updated successfully, but these errors were encountered: