0 Replies Latest reply on Jul 5, 2013 7:12 AM by Herwig Köck

    Custom ViewHandler does not work with JBoss AS 7.1.1

    Herwig Köck Newbie

      I want to implement a custom ViewHandler. Currently I'm only forwarding all calls to the default Viewhandler, but if I enable this ViewHandler in my faces-config.xml, the preRenderView event type (and maybe other functionality) is broken.

      Does anybody no what I'm doing wrong?

      I'm using JBoss AS 7.1.1 and PrimeFaces 3.5.

       

      Thanks.

       

       

      {code}public class ReverseProxyViewHandler extends ViewHandler {


      ViewHandler defaultHandler;


      public ReverseProxyViewHandler(ViewHandler defaultHandler) {

          this.defaultHandler = defaultHandler;

      }


      @Override

      public Locale calculateLocale(FacesContext context) {

          return defaultHandler.calculateLocale(context);

      }


      @Override

      public String calculateRenderKitId(FacesContext context) {

          return defaultHandler.calculateRenderKitId(context);

      }


      @Override

      public UIViewRoot createView(FacesContext context, String viewId) {

          return defaultHandler.createView(context, viewId);

      }


      @Override

      public String getActionURL(FacesContext context, String path) {

          return defaultHandler.getActionURL(context, path);

      }


      @Override

      public String getResourceURL(FacesContext context, String path) {

          return defaultHandler.getResourceURL(context, path);

      }


      @Override

      public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException {

          defaultHandler.renderView(context, viewToRender);

      }


      @Override

      public UIViewRoot restoreView(FacesContext context, String viewId) {

          return defaultHandler.restoreView(context, viewId);

      }


      @Override

      public void writeState(FacesContext context) throws IOException {

          defaultHandler.writeState(context);

      }


      }

      {code}