Page 1 of 1
<p:inputSwitch> loses styles when switching multiple times
Posted: 20 Jan 2020, 12:41
by jdrouvin
Hello,
in our code, when we use inputSwitch from primefaces 6.4 and apollo we get some issues when users click multiple times. Here is the code:
Code: Select all
<p:inputSwitch id="configured"
value="#{bean.config.configured}"
rendered="#{bean.display}">
Value is "true" in this example.
if you click three times on the component the switch button will end up on "active state" as of what the bean knows but "inactive" in the way it is displayed (the applied CSS is the "inactive" one).
After some search it appears apollo does not handle ui-inputswitch-checked class as expected.
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 21 Jan 2020, 08:27
by mert.sincan
Hi,
Could you please try it without Apollo?
Best Regards,
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 22 Jan 2020, 09:55
by jdrouvin
Hello,
we tested without Apollo and the component behaves as expected.
Regards
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 30 Jan 2020, 15:28
by mert.sincan
Unfortunately, I couldn't replicate this issue. Could you please attach a video link for us?
Best Regards,
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 10 Feb 2020, 11:09
by jdrouvin
Hello,
sorry for the delay, I took some capture of the behaviour with different versions of apollo and without it :
apollo branch 2.x
https://gyazo.com/b4751702f24d67a33f9b596dd636d5eb
You can see the "blue" color is not really consistent (the "off valu" is when the switch is on left side)
apollo branch 3.x
https://gyazo.com/dbd92444f1df36f2b63e9c38fd5cff39
Bug is the same
without apollo
https://gyazo.com/9112e2489c9dc916990f6171f59d6ad9
Base component is ok
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 11 Feb 2020, 14:19
by mert.sincan
Thanks a lot for the videos. I'll check it. But, do you replicate it at
https://www.primefaces.org/apollo/forms.xhtml? Could you please try it?
Best Regards,
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 11 Feb 2020, 14:36
by jdrouvin
On your demo page I do not replacte. But I don't see any listener on this demo.
I forgot to add that on our side we add :
Code: Select all
<p:inputSwitch id="configured"
value="#{bean.config.configured}"
rendered="#{otherBean.validProductLicense(PRODUCT_TYPE.VERS)}">
<p:ajax update="productPanel"
listener="#{bean.changeConfiguration}" />
</p:inputSwitch>
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 28 Feb 2020, 12:34
by mert.sincan
Is this issue resolved?
Best Regards,
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 02 Mar 2020, 09:59
by jdrouvin
It is not.
Re: <p:inputSwitch> loses styles when switching multiple times
Posted: 05 Mar 2020, 13:20
by mert.sincan
Unfortunately, I still couldn't replicate it.