How to reference 6.0 Primefaces namespace

UI Components for JSF
schlebe
Posts: 212
Joined: 25 Sep 2015, 13:32
Location: Colmar-Berg (Luxembourg)

12 Feb 2016, 10:15

I have communicated a bug on PrimeFaces GITHUB relativ to DataTable sort https://github.com/primefaces/primefaces/issues/1051.

To solve my problem, a member propose that I test the new feature <p:repeat>.

I have forked and cloned the fork on my PC like I have already done.

I have build this Release of PrimeFaces without error.

But when I test my program, the browser display a message indicating that it cannot find <p:repeat> component.

I think that this error occurs because the namespace specified in header of my xhtml file is not the right namespace.

For information my header is

Code: Select all

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      >
I think that for my test, http://primefaces.org/ui reference a bad namespace.

Can somebody help me ?

For information, the dependency used in Maven POM.xml file is

Code: Select all

<dependency>
    <groupId>com.goodyear.primefaces</groupId> 
    <artifactId>primefaces</artifactId>
    <version>6.0-SNAPSHOT</version>
</dependency>
But the thruth is out here :)
PrimeFaces 6.2.4
Mojarra 2.2.13
Glassfish 4.1

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

12 Feb 2016, 11:29

Why you think it references a bad namespace? Do other components fail to?

schlebe
Posts: 212
Joined: 25 Sep 2015, 13:32
Location: Colmar-Berg (Luxembourg)

12 Feb 2016, 11:46

because the <p:repeat> component is not found !

I think that the namespace point to PrimeFaces 5.3 namespace and not PrimeFaces 6.0 that define <p:repeat> component.

Attention: the problem is perhaps on our Nexus server !
PrimeFaces 6.2.4
Mojarra 2.2.13
Glassfish 4.1

schlebe
Posts: 212
Joined: 25 Sep 2015, 13:32
Location: Colmar-Berg (Luxembourg)

16 Feb 2016, 10:34

For information ...

When I work in PrimeFaces 5.3, the namespace used in all my xhtml file is

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      >
I think that the namespace xmlns:p="http://primefaces.org/ui" doesn't contain the new <p:repeat> element and that I must use another namespaces.

It is perhaps totally false. But it is the only explanation that I have found to solve my problem !
PrimeFaces 6.2.4
Mojarra 2.2.13
Glassfish 4.1

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

16 Feb 2016, 11:00

the namespace is just a link between the xmlns and the primefaces jar.
the namespace was also not changed for 6.0. So if you remove the 5.3 jar and add 6.0-SNAPSHOT.jar, p:repeat should work.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

schlebe
Posts: 212
Joined: 25 Sep 2015, 13:32
Location: Colmar-Berg (Luxembourg)

16 Feb 2016, 15:06

I turn in round.

I have changed my POM.xml on Netbeans 8.0 and I don't find a solution.

The best thing to do is perhaps to ask.

Has somebody already installed PrimeFaces 6.0-SNAPSHOT on Netbeans with MAVEN ?

I'm interesting to obtain the POM.XML file of the project that use PrimeFaces.

I give you below MY pom.xml file with a lot of line in comment reflecting all my tests !

I have deleted some dependencies not interesting for this problem.

The file below, work with PrimeFaces 5.3 normally. The PrimeFaces JAR file come from our Nexus server that get it from PrimeFaces server.

Code: Select all

<project 
    xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
    >
    
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.goodyear.tlga</groupId>
    <artifactId>tlga</artifactId>
    <version>1.10.7-SNAPSHOT</version>
    <packaging>pom</packaging>
    <url>http://xxxxxxxx.gis.goodyear.com:7000/hudson/job/tlga/site/</url>

    <modules>
        <module>domain</module>
<!--
2016.02.16:BS:GOODFACES
        <module>primefaces</module>
-->        
        <module>web</module>
        <module>webServices</module>
    </modules>

    <properties>
        <timestamp>${maven.build.timestamp}</timestamp>
        <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>

        <project.displayedVersion>${project.version}.${timestamp}</project.displayedVersion>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.scm.id>gitblit</project.scm.id>
        <querydsl.version>3.6.0</querydsl.version>
    </properties>

    <profiles>
    ... SECRET
    </profiles>

    <distributionManagement>
        <downloadUrl>http://xxxxxxxx.gis.goodyear.com:8081/nexus/content/groups/public/</downloadUrl>
        <repository>
            <id>releases</id>
            <url>http://xxxxxxxx.gis.goodyear.com:8081/nexus/content/repositories/releases/</url>
            <uniqueVersion>false</uniqueVersion>
            <layout>default</layout>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <url>http://xxxxxxxx.gis.goodyear.com:8081/nexus/content/repositories/snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
            <layout>default</layout>
        </snapshotRepository>
    </distributionManagement>

    <scm>
        <connection>scm:jgit:http://xxxxxxx:8080/r/tlga/tlga.git</connection>
        <tag>1.7.4</tag>
        <developerConnection>scm:jgit:http://xxxxxxx:8080/r/tlga/tlga.git</developerConnection>
    </scm>

    <build>

        <resources>
            <!--filtering-->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>

        <plugins>

            <!-- For EJB 3.0 (Not necessary to create beans.xml file -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ejb-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <ejbVersion>3.0</ejbVersion>
                    <generateClient>true</generateClient>
                </configuration>
            </plugin>

            <!--Compiler-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArgument>-proc:none</compilerArgument>
                    <annotationProcessors>
                        <annotationProcessor>lombok.core.AnnotationProcessor</annotationProcessor>
                    </annotationProcessors>
                </configuration>
            </plugin>

            <!--Dependency-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
            </plugin>

            <!--War-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
            </plugin>
            
            <!--Release management-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <providerImplementations>
                        <git>jgit</git>
                    </providerImplementations>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <checkModificationExcludes>
                        <checkModificationExclude>**</checkModificationExclude>
                    </checkModificationExcludes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-jgit</artifactId>
                        <version>1.9</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!--Deployment-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
            </plugin>

            <!--Source-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
            </plugin>

            <!--Javadoc-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <links>
                        <link>http://docs.oracle.com/javase/6/docs/api</link>
                        <link>http://www.primefaces.org/documentation</link>
                    </links>
                    <show>private</show>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

    <dependencies>

        <!--LOG-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>

 <!--
        2016.02.16:BS:GOODFACES

         <dependency>
            <groupId>com.goodyear.primefaces</groupId>
            <artifactId>primefaces</artifactId>
        </dependency>
-->
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
        </dependency>

        <dependency>  
            <groupId>org.primefaces.extensions</groupId>  
            <!-- artifactId>cupertino</artifactId -->  
            <artifactId>all-themes</artifactId>  
        </dependency>

        <dependency>
            <groupId>com.goodyear.framework</groupId>
            <artifactId>framework-testing</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-jdk14</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>

            <!--Module-->
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>domain</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>web</artifactId>
                <version>${project.version}</version>
            </dependency>
<!--
2016.02.16:BS:GOODFACES
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>primefaces</artifactId>
                <version>${project.version}</version>
            </dependency>
-->

            <dependency>
                <groupId>com.goodyear.framework</groupId>
                <artifactId>service</artifactId>
                <version>2.7.0</version>
            </dependency>

            <!--LOG-->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.6</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.7.6</version>
            </dependency>

<!--
            <dependency>
                <groupId>com.goodyear.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>5.4-SNAPSHOT</version>
                <version>6.0-SNAPSHOT</version>
            </dependency>

-->
            <dependency>
                <groupId>org.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>5.3</version>
            </dependency>

            <dependency>  
                <groupId>org.primefaces.extensions</groupId>  
                <artifactId>all-themes</artifactId>  
                <version>1.0.8</version>
            </dependency>
            
            <dependency>  
                <groupId>org.primefaces.themes</groupId>  
                <artifactId>afterdark</artifactId>  
                <version>1.0.10</version>  
            </dependency>

<!--
            <dependency>
                <groupId>com.goodyear.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>6.0-SNAPSHOT</version>
            </dependency>
-->

            <dependency>
                <groupId>com.goodyear.framework</groupId>
                <artifactId>framework-testing</artifactId>
                <version>1.2.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-jdk14</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <pluginRepositories>
        <pluginRepository>
            <id>nexus-plugin</id>
            <url>http://xxxxxxxx.gis.goodyear.com:8081/nexus/content/repositories/public</url>
        </pluginRepository>
    </pluginRepositories>

    <repositories>

        <repository>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <layout>default</layout>
            <url>http://repo1.maven.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

    </repositories>

</project>
PrimeFaces 6.2.4
Mojarra 2.2.13
Glassfish 4.1

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

16 Feb 2016, 15:55

I did it many times.
just check out primefaces from github, do a "mvn clean install" to install it to the local maven report and it should work fine.
It works also fine in the showcase.
Last edited by tandraschko on 16 Feb 2016, 16:23, edited 1 time in total.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

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

16 Feb 2016, 16:20

s/report/repository/

schlebe
Posts: 212
Joined: 25 Sep 2015, 13:32
Location: Colmar-Berg (Luxembourg)

16 Jul 2018, 09:13

Today, I encounter the same problem again.

I have download and build on my PC last release of Primefaces to check a bug before posting an issue on Primefaces GITHUB or perhaps correcting it.

The build of Primefaces work perfectly well.

The build of my application work also very well.

The only thing that I have is that
1. all Primefaces widget in all my XHTML file are underlined in RED on Netbeans 8.1.
2. xmlns://primefaces.org/ui declaration line at begin of each XHTML file is flagged as error !

Can somebody explain how xmlns:p="http://primefaces.org/ui" is linked to Primefaces JAR when application in build on Maven ?

How Netbeans know that from "http://primefaces.org/ui" it must search widget XML definition from Primefaces 6.3 SNAPSHOT and not from 6.2 that I use before.
Explanation: Primefaces 6.2 JAR is installed on internal Nexus, but Primefaces 6.3 SNAPSHOT has only build and installad on my PC.
Personnally, I think that Netbeans continue to link new JAR to previous XML definition and that is my problem.
PrimeFaces 6.2.4
Mojarra 2.2.13
Glassfish 4.1

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

16 Jul 2018, 09:42

NetBeans is weird ;)
I always face the same problem.
I recommand you, as user, to not open primefaces itself in NetBeans and just build it via commandline.
Somehow NetBeans does something like a "remap JAR dependency to opened projects" and as the faces-configs are available in the target dir, it fails to do that correctly.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests