3

I have the following issue:

When I click on a tab in an apex:tabpanel, my tab content contains a enhancedList which is squashed to the left, but when I click the 'refresh list' button it fixes itself and looks fine.

Before clicking refresh:

After clicking refresh: After refresh

I've tried inspecting the element and calling the javascript but it doesn't seem to be working. I've also put a function call in the tab's onclick event attribute like so:

<apex:tab label="Edit Opportunities" name="Edit" id="tabThree" onclick="refreshOnClick()">

Javascript:

 function refreshOnClick() {
    ['$id=enhancedList'].refreshList();
 }

but it doesn't seem to be working.

Any idea how I can fix this or what the cause may be?

Thank you!

3
  • 1
    can you check your console in chrome and see if you are getting any error. Commented Oct 19, 2015 at 13:53
  • @TusharSharma No errors, just no result at all.
    – user24634
    Commented Oct 19, 2015 at 14:14
  • 1
    can you post your code
    – Cloud Man
    Commented Oct 19, 2015 at 17:52

1 Answer 1

0

I solved it with the following jQuery:

<script type="text/javascript"> 
    var j$ = jQuery.noConflict();
    j$(function () {
        j$('[id$=tabThree_lbl]').click(function() {
            ListViewport.instances['j_id0:enhancedList'].refreshList()
        });
</script>

You must log in to answer this question.