SEVERE: Error Rendering View

UI Components for JSF
Post Reply
Babas007
Posts: 251
Joined: 24 May 2011, 09:42

24 May 2011, 09:49

Hi Everyone,

I'm using Primefaces 3.0.M1, and I have a problem of rendering, very weird. Here is the page i want to display:

Code: Select all

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="body">

        <p:panel id="panel" header="Authentication">  

            <p:messages />  

            <h:panelGrid columns="2" cellpadding="5">  
                <h:outputLabel for="username" value="Username: *" />  
                <p:inputText id="username"   
                             value="#{userController.username}"   
                             required="true" label="Username">  
                    <f:validateLength minimum="2" />  
                </p:inputText>  

                <h:outputLabel for="username" value="Password: *" />  
                <p:inputText id="password"   
                             value="#{userController.password}"   
                             required="true" label="Password"/>  

            </h:panelGrid>  

            <p:commandButton value="Submit" update="panel" />  

        </p:panel>  

    </ui:define>

</ui:composition>
When I try to display, here is the error message:

Code: Select all

SEVERE: Error Rendering View[/login.xhtml]
java.lang.NullPointerException
	at org.primefaces.component.button.ButtonRenderer.buildOnclick(ButtonRenderer.java:93)
	at org.primefaces.component.button.ButtonRenderer.encodeMarkup(ButtonRenderer.java:58)
	at org.primefaces.component.button.ButtonRenderer.encodeEnd(ButtonRenderer.java:38)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
	at org.primefaces.component.toolbar.ToolbarRenderer.encodeEnd(ToolbarRenderer.java:53)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
        ...
After some tests on all the buttons I have, I found that if I comment the outcome's button I have in my template, it works:

Code: Select all

        <div id="nav">
            <p:toolbar>  
                <p:toolbarGroup align="left" style="padding-left: 225px">  
                    <p:button value="Home" image="ui-icon ui-icon-home" /> 
                </p:toolbarGroup>
                <p:toolbarGroup align="right">  
                        <p:button value="Log In" <!--outcome="login_page"-->/>
                </p:toolbarGroup>  
            </p:toolbar>
        </div>
EDIT: I investigate, it seems appears because of the underscore of "login_page", is that explain I have oftenly have this warning?:
WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /XMPowerWeb, because request parameters have already been read, or ServletRequest.getReader() has already been called
Kind regards

dingo
Posts: 12
Joined: 21 Jun 2011, 06:00

21 Jun 2011, 06:37

This still seems to be a problem as I received the same error today. Is there a resolution for this?
thanks,

Ralph

MyEclipse 10 | EclipseLink 2.3 | PrimeFaces 3.1.1 | Primefaces-Extensions 0.3.0 | Mojarra 2.1.7

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests