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

TOPIC:

'Selected' value in filter combobox 13 Nov 2011 14:18 #486

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
My database contains several thousand entries and I have several filters which break the table into much smaller selections. When I show the initial collection it often times out as it tries to show every line. I would like to set the 'Selected' value on the filter combo to the first item in the list and prevent the default null value from being selected.

Is there an option to do this? (in the class for the combobox perhaps, I looked but couldn't find it)

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

Re: 'Selected' value in filter combobox 14 Nov 2011 10:25 #489

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
There are no options for this.

You have to do it by yourself.
In the controller, or in the model.

You can also define the menu link for this page with an url suffix :

&filter_myfield=my_value
Coding is now a piece of cake

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

Re: 'Selected' value in filter combobox 14 Nov 2011 11:04 #492

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
Thanks for that, I will give it a try.

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

Re: 'Selected' value in filter combobox 14 Nov 2011 20:52 #501

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
The URL filter worked a treat, thanks.

admin wrote: There are no options for this.

You have to do it by yourself.
In the controller, or in the model.

You can also define the menu link for this page with an url suffix :

&filter_myfield=my_value

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

Re: 'Selected' value in filter combobox 17 Nov 2011 12:24 #528

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
A suggestion for the future - If the 'Null value label' for the combo box in a filter is set to 0 (zero) then fill the combo box with values but remove the show all value at the top of the list. Or better still have a check box to to do this perhaps.
Without this I think people will wonder why their component no longer works when their database grows. Mine has 4,500 records and without the filter I just get a blank screen.
Thanks
Trevor

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

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

Just wanted to congratulate you on the J-Cook website / web development tool. In a couple of visits I've had a play around with Cook and have to say I think it is fantastic.  I've played with a number of component builders in the past and yours is certainly looking like the best so far. I'd also like to help you spread the word - I'm really surprised more people aren't excited about this tool. Good luck with the project.
Dean

Get Started