-
8 Nov 2012 5:37 PM #1
Answered: How to add footer element to View?
Answered: How to add footer element to View?
Hi,
I am a beginner in extjs. I am trying to add footer to View in the template. here is my template
and the "test" is repeating for each item. How to make it appear only once and that too at the end?Code:me.tpl = [ me.createHeader(), '<tpl for=".">', '<div class="fieldmapping-item"/>', '</tpl>', '<p>test<test>' ];
Thanks
-
Best Answer Posted by mice-pace
The </tpl> should be ending the loop (and causing the <p> to only run once, that's how it works on mine) so I'm making an educated guess here... Isn't <div> an open/close tag(<div>...</div>), not a singleton (<div />) which might mean it's looking for a tag to close it? (possibly therefore assuming the </tpl> is meant to go inside the tag?) just a guess, but maybe worth a try.
-
8 Nov 2012 5:55 PM #2
just to check, is createHeader only being called once? or you have it running some kind of condition so it returns empty every time after first?
-
8 Nov 2012 6:01 PM #3
it is called just once. However if i put me.createHeader() at the end, i.e. after </tpl> it is called for each item.
-
8 Nov 2012 6:03 PM #4
The </tpl> should be ending the loop (and causing the <p> to only run once, that's how it works on mine) so I'm making an educated guess here... Isn't <div> an open/close tag(<div>...</div>), not a singleton (<div />) which might mean it's looking for a tag to close it? (possibly therefore assuming the </tpl> is meant to go inside the tag?) just a guess, but maybe worth a try.
-
8 Nov 2012 6:08 PM #5
thats it... thats the problem. Thanks much.


Reply With Quote