2

How can I disable the loading screen which appears when using @ViewScoped with DeltaSpike?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Thomas
  • 8,357
  • 15
  • 45
  • 81

2 Answers2

3

Ok, looks like this is working:

@Specializes
public class UkaClientWindowConfig extends DefaultClientWindowConfig {

    private static final long serialVersionUID = 1L;

    @Override
    public ClientWindowRenderMode getClientWindowRenderMode(
                                               FacesContext facesContext) {
        return ClientWindowRenderMode.NONE;
    }

}
Thomas
  • 8,357
  • 15
  • 45
  • 81
  • 1
    With that you lose the window-handling and most DeltaSpike-JSF scopes. The alternative: use the good old but solid window-handling from CODI for DeltaSpike. I found it at http://os890.blogspot.com/2013/07/add-on-codi-scopes-for-deltaspike.html It also disables the window-handling of DeltaSpike with ClientWindowRenderMode.NONE – Dar Whi Aug 09 '13 at 19:37
  • We only use DeltaSpike for its ViewScope. Set `ClientWindowRenderMode.NONE` should not have an effect on the ViewScope, haven't it? Unfortunately the DeltaSpike documentation is far not as good as it should be. Hopefully, we can move on to JSF 2.2 ViewScope as soon as Richfaces 5 is released. – Thomas Aug 10 '13 at 00:20
  • I guess they need some helping hands with the docs, but CODI has nice docs at https://cwiki.apache.org/confluence/display/EXTCDI/Documentation – Dar Whi Sep 16 '13 at 21:21
0

You can change the used HTML Page and customize it like you want:

Copy the deltaspike-jsf-module-impl-x.x.jar#/static/windowhandler.html

to your classes Folder. For maven e.g.: src/main/resources/static/windowhandler.html

Keep in mind that changes to this file will not be published while running for e.g. TomEE in Eclipse. You have to restart the container.

Kuhpid
  • 606
  • 6
  • 14