[SalesForce] Rerender an apex:component

I have a component within an outputPanel like this:

    <apex:panelGrid columns="5" id="theDataGrid">
          <c:GraphAndTable whichData="leadByRep" description="Description 1"/>
    <apex:panelGrid>

I have this action function that triggers the rerender (I checked it works fine)

    <apex:actionFunction name="selectDateRange" rerender="theDataGrid" >
            <apex:param name="dateParam" assignTo="{!mSelectedDateFilter}" value="" />
    </apex:actionFunction>     

Problem: although the panelGrid is reRendered the component inside does not.
Is there anyway to cause the component to reRender as well?

Best Answer

I'm surprised this doesn't work but then I can't remember if I've ever tried it.

Given the global nature of javascript variables and elements used in components you could put an <apex:outputPanel> inside your component wrapping everything else, and give it a particular ID.

Then specify that ID in the rerender attribute of the <apex:actionFunction> as well.

Related Topic