Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

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)

Please Log in or Create an account to join the conversation.

Last edit: by dyoungers. Reason: wrong file reference

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

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

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I am trying to evolve the boolean fly and grid. Stay in touch.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.097 seconds

I'm playing around with the new mvc and the FORK feature is FANTASTIC!!! it's saving me a lot of time! you are doing a very good job!!

Tomaselli (Forum)  

Get Started