Threaded View
-
14 Apr 2011 11:28 AM #1
[B2] Extendable TableChunker?
[B2] Extendable TableChunker?
I'm trying to create my own TreeView, so that I can add my own classes to the markup (for example, I need to get tree-depth-specific classes onto the rows). I've put a collectData method into my TreeView to put the node's depth onto the record, and all I need to do is get that into the template for the view.
From what I can tell by debugging it, I need my own chunker that I can pass in the config to MyTreeView -> TreeView -> TableView, so that I can define my own metaRowTpl, so that the upstream TableView can construct the template for my items.
Problem is, the only chunker implementation is Ext.view.TableChunker, and it's a singleton. I can't seem to extend the class, as it's a singleton. That would seem to be by design, and it's not a bad one.
(Edit: Seems from other posts, I can extend by using Ext.getClass() on the singleton. Ok, that would seem to work, but isn't that a little bit hacky? (in order to extend a class, I need to drill into its definition to find out if it's declared as a singleton, and then extend or override that way?) Also, I would have to use Ext.extend (Ext.getClass(...)...) instead of Ext.define ({ extend...}), which is less nice.)
In that case, to make my own chunker, I need to copy the whole TableChunker implementation and define my own with the metaRowTpl I need. I clearly prefer not to do that just to get my own metaRowTpl definition inserted into the chain.
I'd like to suggest one of the following as regards Ext.view.TableChunker:
- Refactor into an AbstractChunker which the TableChunker singleton extends (and therefore so can I)
- Take the singleton property off the TableChunker class (what is the benefit of that here?)
- Tell me how I'm doing this wrong

Last edited by stevil; 14 Apr 2011 at 11:36 AM. Reason: I've got information, man! New $h1t has come to light!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Make GXT more extendable
By thejoker101 in forum Community DiscussionReplies: 1Last Post: 6 Oct 2010, 9:36 AM -
Extendable toolbar buttons with mouse over action
By mcadirci in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 7 Sep 2010, 3:15 AM -
Extendable Class Pattern
By bocockli in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 3 Feb 2010, 2:27 PM -
[2.2][CLOSED] SimpleStore is not extendable
By elpargo in forum Ext 2.x: BugsReplies: 2Last Post: 2 Dec 2008, 8:25 AM


Reply With Quote