Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Partial Page entry
How-to guide

Add a partial-page rerender to a Visualforce form

Re-render only the related list after a custom action runs, so the rest of the form keeps its unsaved values and the user does not lose their scroll position.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 26, 2026

Re-render only the related list after a custom action runs, so the rest of the form keeps its unsaved values and the user does not lose their scroll position.

  1. Identify the component to re-render

    Wrap the section you want to refresh inside an apex:outputPanel with a stable id attribute (id="rl"). This is the panel the rerender attribute will target.

  2. Add an apex:actionRegion

    Wrap the form fields the partial action depends on inside an apex:actionRegion. Fields outside the region are excluded from the postback and their validation does not fire.

  3. Place the command button

    Add an apex:commandButton with action pointing to the controller method and rerender pointing to the panel id (rerender="rl").

  4. Test the round-trip

    Run the page. Type into a field outside the action region. Click the partial-action button. Confirm the panel re-renders, the field outside the region keeps its value, and the user sees no full-page flash.

  5. Validate scoped validation

    Add a required field outside the region. Click the partial-action button without filling it. The button should still execute; the required field validation only fires on the full save.

  6. Optimize View State

    Mark any controller variable that does not need to persist across postbacks as transient. Run the View State inspector to confirm the page stays under 170 KB.

Key options
apex:outputPanelremember

Wrapper that gets a stable ID for the rerender attribute to target.

apex:actionRegionremember

Scope that limits which form fields post and which validation rules fire.

rerender attributeremember

Comma-separated list of component IDs to refresh after the action.

apex:actionFunctionremember

JavaScript-callable server action; pairs with rerender for client-driven partial updates.

Gotchas
  • The rerender attribute must reference a component ID that exists at the time the postback returns. A component conditionally rendered out (rendered="false") cannot be re-rendered back in; use display:none CSS to keep the DOM node available.
  • Partial postbacks still serialize the full View State. They are not a View State optimization; they are a user-experience optimization.
  • Action regions limit which fields post. Forgetting to wrap a dependent field can leave the controller looking at a stale value the partial action did not include.
  • Lightning Web Components do not use partial-page techniques; do not port these patterns when migrating a Visualforce page to LWC, refactor to reactive data binding instead.

See the full Partial Page entry

Partial Page includes the definition, worked example, deep dive, related terms, and a quiz.