theme wouldn't be applied !!

UI Components for JSF
Post Reply
User avatar
mouadh
Posts: 85
Joined: 27 Apr 2010, 12:47
Location: Tunisia

28 Jun 2010, 15:16

Hi everyone,
i have tried to apply one of the available themes but i get always the default sam theme. I modified the web.xml file so it will disable the sam theme :

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>primefaces.skin</param-name>
        <param-value>none</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</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>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

but when i explore the resulted html page source i get this :

Code: Select all

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<link rel="stylesheet" type="text/css" href="/themeTest/primefaces_resource/2.0.1/yui/menu/assets/skins/sam/menu.css;jsessionid=e756f981935317d6e76710584547" />
<link rel="stylesheet" type="text/css" href="/themeTest/primefaces_resource/2.0.1/primefaces/panel/panel.css;jsessionid=e756f981935317d6e76710584547" />
<script type="text/javascript" src="/themeTest/primefaces_resource/2.0.1/yui/utilities/utilities.js;jsessionid=e756f981935317d6e76710584547"></script>
<script type="text/javascript" src="/themeTest/primefaces_resource/2.0.1/yui/container/container-min.js;jsessionid=e756f981935317d6e76710584547"></script>
<script type="text/javascript" src="/themeTest/primefaces_resource/2.0.1/yui/menu/menu-min.js;jsessionid=e756f981935317d6e76710584547"></script>
<script type="text/javascript" src="/themeTest/primefaces_resource/2.0.1/jquery/jquery.js;jsessionid=e756f981935317d6e76710584547"></script>
<script type="text/javascript" src="/themeTest/primefaces_resource/2.0.1/primefaces/core/core.js;jsessionid=e756f981935317d6e76710584547"></script>
<script type="text/javascript" src="/themeTest/primefaces_resource/2.0.1/primefaces/panel/panel.js;jsessionid=e756f981935317d6e76710584547"></script>

        <link type="text/css" rel="stylesheet" href="skin.css" />
        <title>Page xhtml</title></head><body><div id="j_idt7" class="pf-panel"><div id="j_idt7_hd" class="pf-panel-hd">page xhtml</div><div id="j_idt7_bd" class="pf-panel-bd"></div><span class="pf-panel-hd-controls"></span></div><script type="text/javascript">widget_j_idt7 = new PrimeFaces.widget.Panel('j_idt7', {visible:true});</script></body>
</html>
as you can see both the new css theme and the default the default sam skin are included.
am i missing something or what :? ??
Ben Khalifa Mouadh
engineering student at National School of Computer Sciences - Tunisia
JSF 2.0, GlassFish v3, PF 2.0.1,Majorra 2.0.2, netBeans 6.8

User avatar
Daedalus
Posts: 164
Joined: 28 Jan 2010, 12:03

28 Jun 2010, 16:21

In order to get the themes working you need the current development version of PrimeFaces which would be Primefaces-2.1.RC1-SNAPSHOT.

Download:
http://repository.prime.com.tr/org/prim ... -SNAPSHOT/
PrimeFaces 3.0, Glassfish 3.1.2, Mojarra 2.1.6,

User avatar
mouadh
Posts: 85
Joined: 27 Apr 2010, 12:47
Location: Tunisia

28 Jun 2010, 17:03

i will try it, thanx
Ben Khalifa Mouadh
engineering student at National School of Computer Sciences - Tunisia
JSF 2.0, GlassFish v3, PF 2.0.1,Majorra 2.0.2, netBeans 6.8

User avatar
mouadh
Posts: 85
Joined: 27 Apr 2010, 12:47
Location: Tunisia

01 Jul 2010, 14:16

i see that it works with Primefaces-2.1.RC1-SNAPSHOT but the problem that i have started working on a project 4 months ago using Primefaces-2.0.1 so when i tried to migrate to Primefaces-2.1.RC1-SNAPSHOT the project becomes really a mess :shock: (dialog shown up while they are not rendered, the attribute of many components has changed or removed...).
so is there any way to get the themes working with PF 2.0.1.
Ben Khalifa Mouadh
engineering student at National School of Computer Sciences - Tunisia
JSF 2.0, GlassFish v3, PF 2.0.1,Majorra 2.0.2, netBeans 6.8

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

01 Jul 2010, 14:59

There is no way to use themes with an old version. Some parts of upcoming 2.1.RC1 are not backward compatible yet and browser tests are not completed. We'll release a migration guide and provide the new user's guide along with the new release.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests