MyFaces Core
  1. MyFaces Core
  2. MYFACES-3176

javax.faces.SEPARATOR_CHAR not working together with AJAX

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.0.8, 2.1.2
    • Component/s: None
    • Labels:
      None

      Description

      After changing the default SEPARATOR_CHAR from colon to something else, using AJAX fails:

      org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer.getComponentId(HtmlAjaxBehaviorRenderer.java:291)

      It looks like org.apache.myfaces.renderkit.html.HtmlAjaxBehaviorRenderer assumes that the separator char is always a colon. Here is the method throwing the exception:

         private final String getComponentId(ClientBehaviorContext context, String id) {

             UIComponent contextComponent = context.getComponent();
             UIComponent target = contextComponent.findComponent(id);
             if (target == null)

      {            target = contextComponent.findComponent(COLON + id);        }

             if (target != null)

      {            return target.getClientId();        }

             throw new FacesException("Component with id:" + id + " not found"
      );
       }

      Probably, UINamingContainer.getSeparatorChar(FacesContext) should be used instead of COLON.

        Activity

        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Leonardo Uribe made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Leonardo Uribe [ lu4242 ]
        Fix Version/s 2.0.8 [ 12316514 ]
        Fix Version/s 2.1.2 [ 12316512 ]
        Resolution Fixed [ 1 ]
        Hide
        Leonardo Uribe added a comment -

        replaced COLON with UINamingContainer.getSeparatorChar(context.getFacesContext())

        Feel free to reopen this issue or create a new one if it is required to fix something else. Thanks for the report.

        Show
        Leonardo Uribe added a comment - replaced COLON with UINamingContainer.getSeparatorChar(context.getFacesContext()) Feel free to reopen this issue or create a new one if it is required to fix something else. Thanks for the report.
        Christoph Dietze created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development