javax.faces.SEPARATOR_CHAR not working together with AJAX
---------------------------------------------------------

                 Key: MYFACES-3176
                 URL: https://issues.apache.org/jira/browse/MYFACES-3176
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.1.1
            Reporter: Christoph Dietze


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.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to