Copyright© 2008-2026 Sitevision AB, all rights reserved.
@Requireable(value="RendererContext") public enum RendererContext extends Enum<RendererContext>
Using proper rendering context is important to get the expected output when rendering page content dynamically. This
applies to all functions that use ContentRenderer or TextModuleRenderer to render output.
Page content modules that in any way are contextual (e.g. "prints name of current page") will produce unexpected output if the rendering context is not properly specified.
ORIGIN_PAGE when you want the content to be rendered as it would be
on the page where the content part actually resides.
CURRENT_PAGE when you want the content to be rendered as it would be
if the content part resided on the page that is currently rendering.
| Enum Constant and Description |
|---|
CURRENT_PAGE
Will use the current page as context, i.e. the page that is currently being rendered.
|
ORIGIN_PAGE
Will use the page that is the origin of the content being rendered as context.
|
| Modifier and Type | Method and Description |
|---|---|
static RendererContext |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RendererContext[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Requireable(value="RendererContext.ORIGIN_PAGE") public static final RendererContext ORIGIN_PAGE
Conceptually ~ "I want the content output as-is, as I can see it on the original page where the content part actually resides".
@Requireable(value="RendererContext.CURRENT_PAGE") public static final RendererContext CURRENT_PAGE
Conceptually ~ "I want the content output as it would be if the content part resided on the page that is currently rendering".
public static RendererContext[] values()
for (RendererContext c : RendererContext.values()) System.out.println(c);
public static RendererContext valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullSitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2026 Sitevision AB, all rights reserved.