Alpha Video Training
Results 1 to 14 of 14

Thread: New List Control Checkbox Selector

  1. #1
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,572

    Default New List Control Checkbox Selector

    There's a really nice new List Control Checkbox Selector in pre-release 5704. I've had a quick look under today's pre-release 5706 and it's a welcome addition.

    As an untested first attempt it's not too bad. The styling is a bit funky because the checkbox (it's actually a check-circle) shifts about 4px to the right when it's selected... and stays there. The alignment is then off for the balance of that column.

    There are 6 new "checkbox" methods available as well. Only 2 of them work... a 33% success rate... but that's about on par. I'm sure the others methods and the column alignment will get fixed at some point if someone tests them.

    I don't see a way to "uncheck" a single row, or array of rows or values. You can uncheck all or check all (these fail currently). There's also no way to style the check-circle... maybe that'll be added as well.

  2. #2
    Member
    Real Name
    Bruce Jonson
    Join Date
    May 2010
    Location
    New Zealand
    Posts
    417

    Default Re: New List Control Checkbox Selector

    Yep I was pretty excited to see this much needed functionality.
    Thanks for kicking the tires David, Seems I will wait for a couple of fixes before I get too excited.

    Thanks Alpha, I have been waiting for a built in solution to this.

  3. #3
    Member
    Real Name
    Richard James
    Join Date
    Jun 2004
    Location
    Atlanta, Ga.
    Posts
    224

    Default Re: New List Control Checkbox Selector

    I noticed it too. It will be a useful enhancement. I hope it can be displayed as a checkbox as well as a check circle.

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,572

    Default Re: New List Control Checkbox Selector

    For anyone wanting to try out the Checkbox Selector, add this code into your List Event afterRenderComplete. The methods added to the List object are the same names as the Alpha methods. This code corrects the bugs in the Alpha code. This code also adds in the 2 methods that should also be available... .setUnCheckedRows() and .setUnCheckedValues().

    Code:
    this.setCheckedRows = function(arr) {
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		if(arr.indexOf(i)>-1) _d[i]['__selected'] = true;
    	}
    	this.refresh();
    }
    
    this.setCheckedValues = function(arr) {
    	var _d = this._data;
    	var val;
    	for(var i = 0; i < _d.length; i++) { 
    		val = _d[i]['*value']
    		if(arr.indexOf(val)>-1) _d[i]['__selected'] = true;
    	}
    	this.refresh();
    }
    
    this.unCheckAllRows = function() {
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		_d[i]['__selected'] = false;
    	}
    	this.refresh();
    }
    
    this.checkAllRows = function() {
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		_d[i]['__selected'] = true;
    	}
    	this.refresh();
    }
    
    this.setUnCheckedRows = function(arr){
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		if(arr.indexOf(i)>-1) _d[i]['__selected'] = false;
    	}
    	this.refresh();
    }
    
    this.setUnCheckedValues = function(arr) {
    	var _d = this._data;
    	var val;
    	for(var i = 0; i < _d.length; i++) { 
    		val = _d[i]['*value']
    		if(arr.indexOf(val)>-1) _d[i]['__selected'] = false;
    	}
    	this.refresh();
    }

  5. #5
    Member
    Real Name
    Bruce Jonson
    Join Date
    May 2010
    Location
    New Zealand
    Posts
    417

    Default Re: New List Control Checkbox Selector

    Just had a look at it now the 4px thing mildly annoying... but does sot of create a pseudo animation effect :)

  6. #6
    Member
    Real Name
    Bruce Jonson
    Join Date
    May 2010
    Location
    New Zealand
    Posts
    417

    Default Re: New List Control Checkbox Selector

    Quote Originally Posted by Davidk View Post
    For anyone wanting to try out the Checkbox Selector, add this code into your List Event afterRenderComplete. The methods added to the List object are the same names as the Alpha methods. This code corrects the bugs in the Alpha code. This code also adds in the 2 methods that should also be available... .setUnCheckedRows() and .setUnCheckedValues().

    Code:
    this.setCheckedRows = function(arr) {
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		if(arr.indexOf(i)>-1) _d[i]['__selected'] = true;
    	}
    	this.refresh();
    }
    
    this.setCheckedValues = function(arr) {
    	var _d = this._data;
    	var val;
    	for(var i = 0; i < _d.length; i++) { 
    		val = _d[i]['*value']
    		if(arr.indexOf(val)>-1) _d[i]['__selected'] = true;
    	}
    	this.refresh();
    }
    
    this.unCheckAllRows = function() {
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		_d[i]['__selected'] = false;
    	}
    	this.refresh();
    }
    
    this.checkAllRows = function() {
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		_d[i]['__selected'] = true;
    	}
    	this.refresh();
    }
    
    this.setUnCheckedRows = function(arr){
    	var _d = this._data;
    	for(var i = 0; i < _d.length; i++) { 
    		if(arr.indexOf(i)>-1) _d[i]['__selected'] = false;
    	}
    	this.refresh();
    }
    
    this.setUnCheckedValues = function(arr) {
    	var _d = this._data;
    	var val;
    	for(var i = 0; i < _d.length; i++) { 
    		val = _d[i]['*value']
    		if(arr.indexOf(val)>-1) _d[i]['__selected'] = false;
    	}
    	this.refresh();
    }
    Wow! as always, thanks David!

  7. #7
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,572

    Default Re: New List Control Checkbox Selector

    I've had a pretty good look at it... but cannot figure out how to fix it. If it went back after being unchecked... I might get it... but it doesn't... so it's really just buggy. I'm sure once the feature gets out of pre-beta it'll get straightened out... so to speak.

  8. #8
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,572

    Default Re: New List Control Checkbox Selector

    The List Checkbox feature has been updated to include custom icons... so that's excellent. The List Header can now include a checkbox as well which acts as a Check All/None feature. It doesn't work, but it is there. The 4px shift has been corrected... and the code for 4 out of the 6 methods is still broken and one method is still missing. This is progressing to be a welcome feature of the List Control.

  9. #9
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,572

    Default Re: New List Control Checkbox Selector

    This feature is a really good example of how a pre-release feature is not tested by Alpha and creeps into the official release with a number of bugs.

    In Official Build 5863 here are the bugs carried forward from the pre-release:

    Code:
    lObj.checkAllRows();	//bug
    lObj.unCheckAllRows();	//bug
    lObj.setCheckedRows([1,3,4]);	//bug
    lObj.setCheckedValues(["47","48"]);	//bug
    lObj.setUnCheckedRows([3]);	//bug
    lObj.setUnCheckedValues(["48"]);	//bug
    
    var chkRows = lObj.getCheckedRows();	//works
    var chkValues = lObj.getCheckedValues();	//works
    That's 2 out of 8 methods that work.

    The List Columns, again, shift right when a column is checked. This was fixed, but is now broken again.

    The Option "Has check/un-check all control in column header" not only is grammatically bad, but does not work.

    Finally, this error now shows in the console when working with the List Check-box select control...

    Code:
    174 ERROR: template expression - ReferenceError: vertical is not defined
    That's an error happening 174 times just upon render. Every click of the Check-box select control produces another 174 errors. This has to impact something badly.

    Please Alpha, test your releases... pre and official. If you want suggestions about how you might employ some kind of testing protocol, I'm there are many in this forum with good ideas.

  10. #10
    Member
    Real Name
    Jeremy Scrime
    Join Date
    Sep 2015
    Posts
    87

    Default Re: New List Control Checkbox Selector

    I assumed that if I used the new CheckBox Select Control on the list and left my list property allow multi-select as false that I could only select one item at a time. However, it allowed me to select multiple items (Keeping the checkbox checked) as I checked a 2nd, 3rd, etc item in the list.

    Is this a bug or am I not using this feature correctly?

  11. #11
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,572

    Default Re: New List Control Checkbox Selector

    I believe that's the correct behaviour. The checkbox selector is independent of the single/multi row selector. Your "checking" a row does not select that row.

    It's still badly broken, but nothing that can't be overcome.
    Last edited by Davidk; 06-11-2019 at 06:43 PM.

  12. #12
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    976

    Default Re: New List Control Checkbox Selector

    Hi
    Actually this seems great for a simple use case i need right now.
    Assuming i have a List CheckBox selector with options A, B, C and D
    I would like to Show/Hide some other controls depending on those selections, i.e show a control only if A is selected, etc...any pointers, or am i gonna get bitten?

    Thanks
    Jaime

  13. #13
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,572

    Default Re: New List Control Checkbox Selector

    You want to show/hide other controls on the List Row?

    Your example of A,B,C,D doesn't really speak to the List Checkbox Control. It's a simple true/false checkbox that indicates if a specific List row is checked or not.

    If your example is regarding a List Control, then you'd want to incorporate a Radio Button Control within your List.

    Besides, the List Checkbox Control is still (months now) badly broken and buggy. It's a great feature that's been forgotten and seems won't be fixed.

  14. #14
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    976

    Default Re: New List Control Checkbox Selector

    No, i wanted to create a list of Field Names that are hidden in the UX, and set them as visible depending on the checked options in that list.
    In the end, i leaved it with my old method, i have a a checkbox for each field, clicking on the checkbox toggles visibility for a respective field.

Similar Threads

  1. Checkbox in UX List Control
    By Mike Thomson in forum Mobile & Browser Applications
    Replies: 10
    Last Post: 11-13-2018, 03:34 PM
  2. display logical field as checkbox in a list control
    By frankbicknell in forum Mobile & Browser Applications
    Replies: 52
    Last Post: 04-04-2018, 01:35 PM
  3. List Control Search Checkbox has no effect
    By Scott Emerick in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 05-17-2015, 06:29 PM
  4. List Control Databound Checkbox
    By Davidk in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 01-28-2014, 11:07 AM
  5. Process Records with Checkbox selector
    By aburningflame in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 03-30-2010, 05:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •