ICEfaces
  1. ICEfaces
  2. ICE-5664

Review use of Wrappers rather than directly subclassing interfaces.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Beta1, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2

      Description

      We need to review our strategy of directly subclassing interfaces rather than using the supplied abstract wrappers for delegation:

      public class DOMRenderKit extends RenderKit vs public class DOMRenderKit extends RenderKitWrapper
      public class DOMResponseWriter extends ResponseWriter vs public class DOMResponseWriter extends ResponseWriterWrapper

      In many cases, using the wrapper would give us access to a delegate class where we could take advantage of existing code.

        Issue Links

          Activity

          Hide
          Deryk Sinotte added a comment -

          I've done an initial survey of the various Wrapper classes provided by JSF 2.0 and checked our code for usage. Here's what I've determined so far:

          Classes that provide a wrapper but that we don't currently extend or use:

          ApplicationWrapper
          ExceptionHandlerWrapper
          ExternalContextWrapper
          ResourceWrapper
          StateManagerWrapper
          ViewHandlerWrapper
          VisitContextWrapper

          Classes using Wrappers:

          DOMPartialViewContext extends PartialViewContextWrapper (may be able to clean up some overridden methods that aren't required)

          WriteViewStateOnPageLoad extends FacesContextWrapper

          Classes that should use Wrappers but are directly extending:

          CompatDOMPartialViewContext extends PartialViewContext
          DOMRenderKit extends RenderKit
          ICEfacesResourceHandler extends ResourceHandler
          ICEpushResourceHandler extends ResourceHandler
          BasicResponseWriter extends ResponseWriter
          DOMResponseWriter extends ResponseWriter

          Show
          Deryk Sinotte added a comment - I've done an initial survey of the various Wrapper classes provided by JSF 2.0 and checked our code for usage. Here's what I've determined so far: Classes that provide a wrapper but that we don't currently extend or use: ApplicationWrapper ExceptionHandlerWrapper ExternalContextWrapper ResourceWrapper StateManagerWrapper ViewHandlerWrapper VisitContextWrapper Classes using Wrappers: DOMPartialViewContext extends PartialViewContextWrapper (may be able to clean up some overridden methods that aren't required) WriteViewStateOnPageLoad extends FacesContextWrapper Classes that should use Wrappers but are directly extending: CompatDOMPartialViewContext extends PartialViewContext DOMRenderKit extends RenderKit ICEfacesResourceHandler extends ResourceHandler ICEpushResourceHandler extends ResourceHandler BasicResponseWriter extends ResponseWriter DOMResponseWriter extends ResponseWriter
          Hide
          Deryk Sinotte added a comment -

          I've checked in the changes to the ResponseWriters so now everything that should likely be using wrappers is now converted.

          Show
          Deryk Sinotte added a comment - I've checked in the changes to the ResponseWriters so now everything that should likely be using wrappers is now converted.

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: