0

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.

2
  • I guess you will have to use pagereference Method for that section and set redirect true and navigate to same page .Please provide and detail that we can help Commented Oct 9, 2012 at 10:54
  • Hey sorry for not being clear. Child Page:This page has same functionality, when user clicks on Attachment button on any page. 1.Browse a file. 2.Click on Attach button 3.File is displayed with other details. 4.User clicks Done button and navigated back to parent page. Now user is in parent page.He could see only attachments which were added before, not the current one, as the page is not refershed. I need a specific script, which can refresh only the last section which displays all the attachments. I do not want to reload the whole parent page. Let me know if it is claer now
    – J_B
    Commented Oct 10, 2012 at 4:18

1 Answer 1

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .