oqtane/OqtaneSSR

Rendering Problem With Static RenderMode Attribute When Using Same Interactive Rendering Mode For All Modules

Closed this issue · 1 comments

Configuring the appsettings.json to the following - which sets the RenderMode to InteractiveServer for all modules

"Modules": [
  {
    "PagePath": "/",
    "PageName": "Home",
    "ThemeType": "OqtaneSSR.Components.Themes.MainLayout, OqtaneSSR",
    "PaneName": "Default",
    "ContainerType": "OqtaneSSR.Components.Containers.Container1, OqtaneSSR",
    "ModuleType": "OqtaneSSR.Client.Components.Home, OqtaneSSR.Client",
    "RenderMode": "InteractiveServer"
  },
  {
    "PagePath": "/counter",
    "PageName": "Counter",
    "ThemeType": "OqtaneSSR.Components.Themes.MainLayout, OqtaneSSR",
    "PaneName": "Default",
    "ContainerType": "OqtaneSSR.Components.Containers.Container1, OqtaneSSR",
    "ModuleType": "OqtaneSSR.Client.Components.Counter, OqtaneSSR.Client",
    "RenderMode": "InteractiveServer"
  },
  {
    "PagePath": "/weather",
    "PageName": "Weather",
    "ThemeType": "OqtaneSSR.Components.Themes.MainLayout, OqtaneSSR",
    "PaneName": "Default",
    "ContainerType": "OqtaneSSR.Components.Containers.Container1, OqtaneSSR",
    "ModuleType": "OqtaneSSR.Client.Components.Weather, OqtaneSSR.Client",
    "RenderMode": "InteractiveServer"
  }
]

Initial Render:

image

Click Counter in navigation:

image

** Note that although all nested components indicate they were processed successfully, the UI does not render the Counter component.

Click Weather in navigation:

image

** Note that although all nested components indicate they were processed successfully, the UI does not render the Weather component.

This behavior only occurs with Container1w hen the RenderMode is set to the same interactive render mode for all modules in the site. Container1 internally uses ModuleInstance1 which utilizes a custom DynamicComponentAttribute component for rendering module components. DynamicComponentAttribute is a wrapper around 3 sub-components which internally use static @Attribute [RenderModeInteractiveAuto] definitions. Note that if the RenderMode varies from module to module, the components are rendered fine. Also if RenderMode is set to Server (non-interactive) for all modules, it also works fine.

closing in favor of using an instance-based rendermode attrubute approach which does not have this rendering problem