myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabrielle Crawford (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (TRINIDAD-2069) when trinidad on class path get NPE using html_basic render kit
Date Wed, 23 Mar 2011 20:41:06 GMT

    [ https://issues.apache.org/jira/browse/TRINIDAD-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010420#comment-13010420
] 

Gabrielle Crawford commented on TRINIDAD-2069:
----------------------------------------------

 this is the code that is getting the NPE:
    protected Renderer getRenderer(FacesContext context) {

        String rendererType = getRendererType();
        Renderer result = null;
        if (rendererType != null) {
            result = context.getRenderKit().getRenderer(getFamily(),
                    rendererType);

getRenderKit() returns NULL, 

That's because null is returned from javax.faces.component.UIViewRoot in this method.
    /**
     * <p>Return the render kit identifier of the {@link
     * javax.faces.render.RenderKit} associated with this view.  Unless
     * explicitly set, as in {@link
     * javax.faces.application.ViewHandler#createView}, the returned
     * value will be <code>null.</code></p>
     */
    public String getRenderKitId() {

        return (String) getStateHelper().eval(PropertyKeys.renderKitId);

    }


> when trinidad on class path get NPE using html_basic render kit
> ---------------------------------------------------------------
>
>                 Key: TRINIDAD-2069
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2069
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta-2
>            Reporter: Gabrielle Crawford
>            Assignee: Gabrielle Crawford
>
> Trinidad is on the class path, but using html_basic renderkit.
> When doing a postback we get
> java.lang.NullPointerException
> at
> javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1269)
> at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:789)
> at
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1048)
> at
> javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1043)
> at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:922)
> at
> com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:74)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)

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

Mime
View raw message