<p:inputSwitch> loses styles when switching multiple times

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
jdrouvin
Posts: 5
Joined: 05 Jan 2018, 16:52

20 Jan 2020, 12:41

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.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

21 Jan 2020, 08:27

Hi,

Could you please try it without Apollo?

Best Regards,

jdrouvin
Posts: 5
Joined: 05 Jan 2018, 16:52

22 Jan 2020, 09:55

Hello,

we tested without Apollo and the component behaves as expected.

Regards

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

30 Jan 2020, 15:28

Unfortunately, I couldn't replicate this issue. Could you please attach a video link for us?

Best Regards,

jdrouvin
Posts: 5
Joined: 05 Jan 2018, 16:52

10 Feb 2020, 11:09

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

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

11 Feb 2020, 14:19

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,

jdrouvin
Posts: 5
Joined: 05 Jan 2018, 16:52

11 Feb 2020, 14:36

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>

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

28 Feb 2020, 12:34

Is this issue resolved?

Best Regards,

jdrouvin
Posts: 5
Joined: 05 Jan 2018, 16:52

02 Mar 2020, 09:59

It is not.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

05 Mar 2020, 13:20

Unfortunately, I still couldn't replicate it.

Post Reply

Return to “Apollo - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests