I have an application using TrisStateCheckbox in filtering lists (like All, Active. Inactive entries). It worked fine till version 6.0.
The backed bean initializes the value to "2" but starting with version 6.0 TriStateCheckbox looks like value="0" and acts accordingly in first post-back..
I think the problem is due to the fact now the base class is HtmlSelectBooleanCheckbox while till checkin from 03/05/2016 19:01 (message #317) it was HtmlInputText.
Several facts:
-Method eval from javax.faces.componen.ComponentStateHelper now return string "false" while in previous version returned "2"
-The statment ValueExpression ve = component.getValueExpression(key.toString()); in the same method initializes a ValueExpression who's delegate expects now a return type of Boolean while previously it was expecting an Object
-valCheck = Integer.valueOf(ComponentUtils.getValueToRender(context, checkbox)); in encodeEnd method of org.primefaces.extensions.component.tristatecheckbox.TriStateCheckboxRenderer will throw an exception since "false" can not be converted to an Integer so that (in catch part) the return value is initialized to 0, were from it comes the described behavoiur
Primefaces Ext 6.0-TriStateCheckbox bug
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
oleg found the same bug today, we will fix it the next weeks but not sure if we will release a bugfix release for only 1 bug.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
The bug is fixed (thanks to Thomas): https://github.com/primefaces-extension ... 73086f8d24
You can create TriStateCheckbox and Renderer in your project + register them in faces-config.xml. Sorry for inconvenience, we have merged a not well tested pull request from the community.
If we have another 2-3 changes / commits, we will release the 6.1.0 version. Currently there are only 2 changes after 6.0.0 release.
You can create TriStateCheckbox and Renderer in your project + register them in faces-config.xml. Sorry for inconvenience, we have merged a not well tested pull request from the community.
If we have another 2-3 changes / commits, we will release the 6.1.0 version. Currently there are only 2 changes after 6.0.0 release.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Posts: 6
- Joined: 26 Apr 2014, 10:58
Tahnk you.
- Added to my project both TriStateCheckbox and TriStateCheckboxRenderer (latest version from git hub)
- Added to faces-config.xml
<render-kit>
<renderer>
<component-family>org.primefaces.extensions.component</component-family>
<renderer-type>org.primefaces.extensions.component.TriStateCheckboxRenderer</renderer-type>
<renderer-class>ro.mycompany.primefaces.extensions.TriStateCheckboxRenderer</renderer-class>
</renderer>
</render-kit>
<component>
<component-type>org.primefaces.extensions.component.TriStateCheckbox</component-type>
<component-class>ro.mycompany.primefaces.extensions.TriStateCheckbox</component-class>
</component> - Worked
-
- Information
-
Who is online
Users browsing this forum: No registered users and 13 guests