Find your content:

Search form

You are here

Refresh subsection of parent page

 
Share

My VF page has 10 sections.Section-10 has 1 button(name-Attachment) and 2 sub sections. On button click a new VF page opens, where I have option to attach files. Once file is attached, user is navigated back to parent page. In section-10, sub section-2, I have a section to show all attachments. I have 2 different controllers and 2 pages for the parent and Attachment page(on click of attachment button).

My Requirement-I want to refresh subsection-2 of section 10(not the whole page), when attachment is done.


Attribution to: J_B

Possible Suggestion/Solution #1

Are you using the reRender attribute ?

I'm imagining its probably :

<apex:pageBlockSection id = "section10">
<apex:outputPanel id ="section10A">
..... attachment logic
//have something here which invokes a rerender of the section10B
eg 

    <apex:commandButton value="Attach"  action="{!attach} reRender="section10B" /> 

    OR

    <apex:commandButton value="Attach" onclick"attachAndRefresh()" />
    <apex:actionFunction name="attachAndRefresh" reRender="section10B" />

    </apex:outputPanel>

    <apex:outputPanel id ="section10B">
    ..... Display Attachments
    </apex:outputPanel>

Here's the reference http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_ajax_partial_page_updates.htm


Attribution to: techtrekker
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/2077

My Block Status

My Block Content