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

TOPIC:

[ADDED] List limit 06 Dec 2012 21:27 #5877

Hello,

I'm trying to deal with the "protected $_default_limit = null;" in the view.html.php file of my component but with no success. I want to have a no limit list of the data of my component but it remains predifined on 20. Any solution ?

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

Re: List limit 07 Dec 2012 21:59 #5912

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Hi and welcome to the community.

It is possible that I forgot it in 2.0 beta.

Nice catch.
Coding is now a piece of cake

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

Re: List limit 09 Dec 2012 10:13 #5943

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Well.

Just added for you (in 2.0 of course):

In the concerned list model,
populateSate() function :
//ADD THIS
	$this->setState('list.limit.default', '0');
	
//BEFORE THIS
	parent::populateState('a.xxx', 'asc');

'0' is for 'All' in this example.

This example will set up a default list limit is unset by the user.


Now, if you want to absolutly force the limit :
	$this->setState('list.limit', '0');

Enjoy it ;-)
Coding is now a piece of cake
The following user(s) said Thank You: JoomGuy

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

Re: List limit 15 Dec 2012 18:29 #6145

Really Cool, Thanks!

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

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

Freakin' Awesome!!! J-Cook is simply awesome - whether you're a highly experienced developer or complete novice whether you're building a small inventory component or a complete community solution! The beauty comes from a fast slick and reliable platform that readily provides developers with everything they'll need to build the backbone of a solid and secure component with wizards for authoring access publishing aliasing created/modified by dates... you name it COOK provides it! J-Cook really surpasses all of the 'competition' as far as MVC tools are concerned! Try love it and get cooking!
learnthrusong (JED)
          

Get Started