PFE components are not displayed on xhtml page

Community Driven Extensions Project
Post Reply
kontsevich
Posts: 3
Joined: 01 Jul 2014, 13:36

14 Jul 2014, 15:58

Hi guys,

I'm using PF 5.0 and PFE 2.0, and also NetBeans with GlassFish server 4.
The problem in following: my web-page is not displaying in any browser (Chrome, IE etc), nevertheless it works fine in NetBeans built-in browser. Nonetheless I can see my xhtml code in IE- or Chrome code-viewers.

Further some errors appear:

Code: Select all

Uncaught SyntaxError: Unexpected end of input (20:11:58:972 | error, javascript)
  at http://localhost:8080/svn/faces/javax.faces.resource/jquery/jquery.js?ln=primefaces&v=5.0&v=5.0:5240
Uncaught SyntaxError: Unexpected end of input (20:11:59:062 | error, javascript)
  at http://localhost:8080/svn/faces/javax.faces.resource/jquery/jquery-plugins.js?ln=primefaces&v=5.0&v=5.0:5149
Uncaught SyntaxError: Unexpected end of input (20:11:59:164 | error, javascript)
  at http://localhost:8080/svn/faces/javax.faces.resource/primefaces.js?ln=primefaces&v=5.0&v=5.0:22
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:274 | error, javascript)
    at (anonymous function) (http://localhost:8080/svn/faces/javax.faces.resource/primefaces-extensions.js?ln=primefaces-extensions&v=2.0.0&v=2.0.0:9:39)
Uncaught SyntaxError: Unexpected end of input (20:11:59:328 | error, javascript)
  at http://localhost:8080/svn/faces/javax.faces.resource/layout/layout.js?ln=primefaces-extensions&v=2.0.0&v=2.0.0:137
Uncaught ReferenceError: $ is not defined (20:11:59:372 | error, javascript)
    at (anonymous function) (web/file.xhtml:16:51)
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:383 | error, javascript)
    at (anonymous function) (web/file.xhtml:24:576)
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:394 | error, javascript)
    at (anonymous function) (web/file.xhtml:28:71)
Uncaught ReferenceError: $ is not defined (20:11:59:404 | error, javascript)
    at (anonymous function) (web/file.xhtml:29:633)
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:416 | error, javascript)
    at (anonymous function) (web/file.xhtml:37:610)
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:429 | error, javascript)
    at (anonymous function) (web/file.xhtml:47:1130)
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:440 | error, javascript)
    at (anonymous function) (web/file.xhtml:47:2363)
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:452 | error, javascript)
    at (anonymous function) (web/file.xhtml:47:3596)
Uncaught ReferenceError: PrimeFaces is not defined (20:11:59:471 | error, javascript)
Could you please advice me what to do?

The main part of my code

Code: Select all

                <pe:layoutPane position="east" size="200" resizable="false" >  
                    <pe:layoutPane position="center" minHeight="60">  
                        <f:facet name="header">  
                            <h:outputText value="Countries" style="font-weight:bold"/>  
                        </f:facet>  
                        <h:form id="f01" style="margin-left: -5px; ">
                            <p:inputText
                                id="searchTextCountry" 
                                value="#{indicatorsView.displaySearchTextCountry}" 
                                style="width: 90%; box-shadow:none; height: 13px; font-size: 12px"
                                immediate="true">
                                <p:ajax event="keyup" update="treeCountry"
                                        onstart="searchTextOnStart('f01:treeCountry')" 
                                        oncomplete="searchTextOnComplete('f01:searchTextCountry', 'f01:treeCountry')" />
                            </p:inputText>
                            <p:tree
                                widgetVar="treeCountry"
                                id="treeCountry"
                                value="#{indicatorsView.treeCountries}"
                                var="item"
                                selectionMode="single"
                                dynamic="true"
                                style="width: 96%"
                                >
                                <p:treeNode type="g">
                                    <div onmousedown="onTreeNodeMouseDown(event);" onmouseup="onTreeCountryNodeMouseUp(event);" > 
                                        <h:outputText  title="#{item}" value="#{item.countryGroupName}"/>
                                    </div>
                                </p:treeNode>
                                <p:treeNode type="c">
                                    <p:selectBooleanCheckbox value="#{item.selected}" widgetVar="c_#{item.countryId}" itemLabel="#{item.countryName}">
                                        <p:ajax listener="#{indicatorsView.countryCheckboxListener}"  oncomplete="partialRefreshGraph(xhr, status, args);"/>
                                    </p:selectBooleanCheckbox>
                                </p:treeNode>
                            </p:tree>
                        </h:form>
                    </pe:layoutPane>  
                </pe:layoutPane>  

                <pe:layoutPane position="west" size="250" resizeWhileDragging="true" resizable="false" >  
                    <f:facet name="header">  
                        <h:outputText value="Indicators" style="font-weight:bold"/>  
                    </f:facet>
                    <h:form id="f02" style="margin-left: -5px; padding: 0px;">
                        <p:inputText

                            id="searchTextIndicator" 
                            value="#{indicatorsView.displaySearchTextIndicator}" 
                            style="width: 90%; box-shadow:none; height: 13px; font-size: 12px " 
                            immediate="true"
                            >
                            <p:ajax event="keyup" update="treeIndicator"
                                    onstart="searchTextOnStart('f02:treeIndicator')" 
                                    oncomplete="searchTextOnComplete('f02:searchTextIndicator', 'f02:treeIndicator')" />
                        </p:inputText>
                        <p:tree
                            widgetVar="treeIndicator"
                            id="treeIndicator"
                            value="#{indicatorsView.treeIndicators}"
                            var="item"
                            selectionMode="single"
                            dynamic="true"
                            >

                            <p:treeNode type="g"  >
                                <div onmousedown="onTreeNodeMouseDown(event);" onmouseup="onTreeIndicatorNodeMouseUp(event);" > 
                                    <h:outputText title="#{item}" value="#{item.indicatorGroupName}"/>
                                </div>
                            </p:treeNode>
                            <p:treeNode type="i">
                                <p:selectBooleanCheckbox value="#{item.selected}" widgetVar="i_#{item.indicatorId}" itemLabel="#{item.indicatorName}">
                                    <p:ajax listener="#{indicatorsView.indicatorCheckboxListener}" update="@form"  oncomplete="refreshGraph(xhr, status, args);"/>
                                </p:selectBooleanCheckbox>
                            </p:treeNode>
                        </p:tree>
                    </h:form>
                </pe:layoutPane>  

web.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <context-param>
        <param-name>org.primefaces.extensions.DELIVER_UNCOMPRESSED_RESOURCES</param-name>
        <param-value>false</param-value>
    </context-param>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    
<servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
    
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/indicators.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

16 Jul 2014, 15:50

Not sure about exact root cause of this issue.Better you can start debugging your page with simple jsf and pf components.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

17 Jul 2014, 09:55

looks more like a network issue

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

17 Jul 2014, 11:02

kukeltje wrote:looks more like a network issue
Might be.But the issue occurred in local system itself(localhost).
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

17 Jul 2014, 13:07

hmmmm.... you are right. In stackoverflow I found this:

http://stackoverflow.com/questions/3983 ... d-of-input

More on this: https://www.google.nl/search?q=Uncaught ... d+of+input

Weird that this happens. Maybe some 'error' in custom script or something strange in PF, PFE or ....

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests