Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Boolean values in the grid view only toggle off

Boolean values in the grid view only toggle off 03 Sep 2013 19:15 #10962

  • dyoungers
  • dyoungers's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 16
  • Karma: 0
Was testing a view with a boolean value in a list view and noticed that the toggle only worked from "true" to "false" and not from "false" to "true" and it seemed that was probably a bug

In looking through the code, I see the embedLink function in html.php (line 352) has the following test before adding a link to the html
if ((isset($this->href) || isset($this->target) ||  isset($this->task)) && (isset($this->dataValue)) && (!empty($this->dataValue)))

It seems that the last check for an empty data value is at fault here because a boolean "false" is stored as a zero in the database and it always fails the test (the PHP empty function returns true for a 0 value)

Not sure the entire intent here but the check using the isset function tests for null value and that might be sufficient?

Dave

SORRY ... wrong forum (please move)
Last Edit: 03 Sep 2013 21:47 by dyoungers. Reason: wrong file reference
The administrator has disabled public write access.

Boolean values in the grid view only toggle off 04 Sep 2013 16:32 #10967

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 415
  • Thank you received: 132
  • Karma: 47
Moved...
And i had a ticket for this a while back but cant seem to find it...
very much similar (notes below just in case my ticket is still pending)
- i noticed that the default value was not set correctly in the model (i set the default in the builder to be true and downloaded model was false)
- i also noticed that if you changed the value to 1 - by accessing the data base - you could then toggle as much as you liked
As i said unsure if the above has been fixed
The administrator has disabled public write access.

Boolean values in the grid view only toggle off 05 Sep 2013 09:18 #10979

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I am trying to evolve the boolean fly and grid. Stay in touch.
Coding is now a piece of cake
The administrator has disabled public write access.

Boolean values in the grid view only toggle off 23 Sep 2013 18:09 #11158

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.076 seconds

Get Started