Most components are not working

UI Components for JSF
Post Reply
seeu
Posts: 3
Joined: 30 Sep 2010, 17:32

30 Sep 2010, 17:39

Hello,

if I use some components like tabView they are completly unstyled. I found out that no javascript files are included in my response.
As far as I understood JSF 2 and Primefaces would include the dependecies automatically as soon as I use a component.

My code looks like that

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:rich="http://richfaces.org/rich" xmlns:p="http://primefaces.prime.com.tr/ui" >




	<h:form id="test">
		<p:tabView dynamic="true" cache="true">

			<p:tab title="Caption Tab 1">
				<h:panelGrid columns="2" cellpadding="10">
					<h:outputText value="Test Tabs 1" />
				</h:panelGrid>
			</p:tab>
			<p:tab title="Caption Tab 2">
				<h:panelGrid columns="2" cellpadding="10">
					<h:outputText value="Test Tabs 2" />
				</h:panelGrid>
			</p:tab>
		</p:tabView>
	</h:form>

</ui:composition>
Thanks in advance

dhaalves
Posts: 13
Joined: 27 Apr 2010, 16:54
Location: Brazil

30 Sep 2010, 17:45

What´s your version?

Do you have the code above in your web.xml?

<context-param>
<param-name>primefaces.skin</param-name>
<param-value>none</param-value>
</context-param>

if yes, try to remove.
PrimeFaces 3.0-SNAPSHOT, Mojarra 2.0.4, Glassfish 3.0.1/GAE

seeu
Posts: 3
Joined: 30 Sep 2010, 17:32

01 Oct 2010, 09:14

I'am using primefaces-2.2.M1.jar from maven repository. Unfortunately the parameter you mentioned isn't set in my web.xml.

1. My web.xml look like this

Code: Select all

	<context-param>
		<param-name>org.richfaces.skin</param-name>
		<param-value>deepMarine</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>*.xhtml</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>

	<welcome-file-list>
		<welcome-file>index.xhtml</welcome-file>
	</welcome-file-list>

	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>/faces/*</url-pattern>
	</servlet-mapping>

	<context-param>
		<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
		<param-value>true</param-value>
	</context-param>
2. I am using jetty for preview of the pages.
3. faces-config

Code: Select all

<application>
        <locale-config>
            <default-locale>en_US</default-locale>
            <supported-locale>de</supported-locale>
        </locale-config>
        <resource-bundle>
            <base-name>com.someclasspackage.loc</base-name>
            <var>msgs</var>
        </resource-bundle>
    </application> 

4. As far as I understood the following lines are not necessary any more in the new Primeface versions:

Code: Select all

<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/primefaces_resource/*</url-pattern>
</servlet-mapping>

seeu
Posts: 3
Joined: 30 Sep 2010, 17:32

01 Oct 2010, 09:28

And faclet is this.

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:rich="http://richfaces.org/rich" 
	xmlns:p="http://primefaces.prime.com.tr/ui" >




	<h:form id="test">
		<p:tabView dynamic="true" cache="true">

			<p:tab title="Caption Tab 1">
				<h:panelGrid columns="2" cellpadding="10">
					<h:outputText value="Test Tabs 1" />
				</h:panelGrid>
			</p:tab>
			<p:tab title="Caption Tab 2">
				<h:panelGrid columns="2" cellpadding="10">
					<h:outputText value="Test Tabs 2" />
				</h:panelGrid>
			</p:tab>
		</p:tabView>
	</h:form>

</ui:composition>
Just the Text is rendered and an <ul> no styles are attached and javascript is also missing.

dhaalves
Posts: 13
Joined: 27 Apr 2010, 16:54
Location: Brazil

04 Oct 2010, 16:57

U see no style only on the preview with jetty?
U check it on pop browser?

Possible things i´d try:

Remove the richfaces skin setting in the web.xml.

Well I hope it work.
PrimeFaces 3.0-SNAPSHOT, Mojarra 2.0.4, Glassfish 3.0.1/GAE

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Oct 2010, 17:02

Do you have h:head?

notcourage
Posts: 38
Joined: 06 Oct 2010, 05:29

24 Oct 2010, 06:50

Same thing is happening to me. I have the minimal html test file. I'm using myfaces 2.02, intellij, appengine 3.8, and:
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>2.2.M1</version>
</dependency>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 Oct 2010, 10:42

There was a bug related to myfaces 2.x compatibility which was fixed, try 2.2.RC1-SNAPSHOT.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 31 guests