MyFaces Core
  1. MyFaces Core
  2. MYFACES-2743

Organize renderBehaviorizedXXX method parameters and add new ones

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Actually we have the following methods to render behaviorized attributes on HtmlRendererUtils:

      public static boolean renderBehaviorizedAttribute(
      FacesContext facesContext, ResponseWriter writer,
      UIComponent component, Map<String, List<ClientBehavior>> clientBehaviors, String eventName, String componentProperty,
      String htmlAttrName) throws IOException

      public static void renderBehaviorizedEventHandlers(
      FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent,
      Map<String, List<ClientBehavior>> clientBehaviors) throws IOException

      public static void renderBehaviorizedEventHandlersWithoutOnclick(
      FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent,
      Map<String, List<ClientBehavior>> clientBehaviors) throws IOException

      public static void renderBehaviorizedFieldEventHandlers(
      FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent,
      Map<String, List<ClientBehavior>> clientBehaviors) throws IOException

      public static void renderBehaviorizedFieldEventHandlersWithoutOnchange(
      FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent,
      Map<String, List<ClientBehavior>> clientBehaviors) throws IOException

      public static void renderBehaviorizedFieldEventHandlersWithoutOnchangeAndOnselect(
      FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent,
      Map<String, List<ClientBehavior>> clientBehaviors) throws IOException

      public static boolean renderBehaviorizedOnchangeEventHandler(
      FacesContext facesContext, ResponseWriter writer, UIComponent uiComponent,
      Map<String, List<ClientBehavior>> clientBehaviors) throws IOException

      The problem can be seen when we tried to enhance tomahawk, rendering behaviorized attributes (TOMAHAWK-1474). We are starting to have a lot of methods everywhere that does not fall in the base case but do some "hack" to make some attribute work. So, we start to have duplicate code everywhere.

      We need to think in a more simple, better documented api for render behaviorized attributes. I don't like to change method signatures of existing methods but I think we need to do it in this case.

        Activity

        Leonardo Uribe created issue -
        Leonardo Uribe made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.1-SNAPSHOT [ 12314891 ]
        Resolution Fixed [ 1 ]
        Leonardo Uribe made changes -
        Fix Version/s 2.0.1 [ 12315117 ]
        Fix Version/s 2.0.1-SNAPSHOT [ 12314891 ]
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        24d 22h 39m 1 Leonardo Uribe 28/Jun/10 22:03
        Resolved Resolved Closed Closed
        16d 22h 42m 1 Leonardo Uribe 15/Jul/10 20:46

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Leonardo Uribe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development