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.309 seconds

This is what you call a component builder. I was able to master using this in a very short time and the resulting component works like a charm. Not just a basic component builder but a fully working component builder with forms fields tables all ready to go. You can make the list and item views to display in the front and back end. Also there is a great forum just starting to evolve and I'm sure this will grow very rapidly when you all realise how good this tool is.
Kevin (JED)

         

Get Started