U4-2750 - Create MergeParentContextViewData filter for SurfaceControllers and PartialViewMacroController so the ParentViewContext is automatically merged into the child action VIewData

Created by Shannon Deminick 30 Aug 2013, 02:07:21 Updated by Shannon Deminick 17 Dec 2013, 02:18:39

Essentially this just means that you no longer have to do this: @ViewContext.ParentActionViewContext.ViewData

Because the parent's viewdata will be merged into the current child action viewdata (still retaining any custom values in the child context).

So for partial view macros or any child action on a SurfaceController, you can just access view Data like @ViewData or @ViewBag

In some cases you might be rendering a child action inside a child action, no problems, we recursively merge in the ancestry of the ViewData.

Comments

Shannon Deminick 30 Aug 2013, 02:53:24

Completed in :

f332e6530a00b6af396fb10ac65d987412b436a8 c228c24ba51a5cb01da90844eb3bc4699db4eeb6


Priority: Normal

Type: Feature (request)

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category: Editor

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 6.2.0

Sprint:

Story Points:

Cycle: