[
https://issues.jboss.org/browse/RF-11796?page=com.atlassian.jira.plugin.s...
]
Paul Dijou commented on RF-11796:
---------------------------------
Really sorry guys, I was away from home these last few days. Back now and I have make a
few tests.
So first, adding the "<rich:jQuery rendered="false" />" to the
sample. All Primefaces features (style and Javascript) are back but RichFaces composents
no longuer works (no popup for the calendar, no file list for the fileUpload). Here is the
head of the HTML source :
{quote}
<head>
<link type="text/css" rel="stylesheet"
href="/richfaces-showcase/faces/javax.faces.resource/theme.css?ln=primefaces-aristo"
/>
<link type="text/css" rel="stylesheet"
href="/richfaces-showcase/faces/javax.faces.resource/primefaces.css?ln=primefaces"
/>
<link type="text/css" rel="stylesheet"
href="/richfaces-showcase/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.1.0-SNAPSHOT/Packed/classic/skinning.css"
/>
<script type="text/javascript"
src="/richfaces-showcase/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.1.0-SNAPSHOT/Packed/packed/packed.js"></script>
<script type="text/javascript"
src="/richfaces-showcase/faces/javax.faces.resource/jquery/jquery.js?ln=primefaces"></script>
<script type="text/javascript"
src="/richfaces-showcase/faces/javax.faces.resource/primefaces.js?ln=primefaces"></script>
<link type="text/css" rel="stylesheet"
href="/richfaces-showcase/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.1.0-SNAPSHOT/Packed/classic/packed/packed.css"
/>
<script type="text/javascript"
src="/richfaces-showcase/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development"></script>
<title>RichFaces Application</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
</head>
{quote}
Then I rembered that I had already try this solution to another project and the result was
quite different. So I add the same rich:jQuery tag to this project. And tadammm, all
nearly works. All Javascript features from both RichFaces and Primefaces are working. The
only minor problem is that when you leave a page (by clicking on a button or a link), you
can see all buttons losing there Primefaces style and only conserve the basic navigator
style. Don't ask me why. Here is the head of this project :
{quote}
<head>
<link type="text/css" rel="stylesheet"
href="/jawesa/javax.faces.resource/theme.css.jsf?ln=primefaces-aristo" />
<link type="text/css" rel="stylesheet"
href="/jawesa/javax.faces.resource/css/screen.css.jsf" />
<link type="text/css" rel="stylesheet"
href="/jawesa/javax.faces.resource/primefaces.css.jsf?ln=primefaces" />
<link type="text/css" rel="stylesheet"
href="/jawesa/javax.faces.resource/password/password.css.jsf?ln=primefaces"
/>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/jquery.js.jsf"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/jquery.component.js.jsf?ln=org.richfaces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/primefaces.js.jsf?ln=primefaces"></script>
<link type="text/css" rel="stylesheet"
href="/jawesa/rfRes/panel.ecss.jsf?db=eAFLq7x7HgAFkAKM&ln=org.richfaces"
/>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/jsf.js.jsf?ln=javax.faces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/jquery.position.js.jsf"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/richfaces.js.jsf"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/richfaces-base-component.js.jsf"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/richfaces-event.js.jsf"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/json-dom.js.jsf?ln=org.richfaces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/jquery.effects.core.js.jsf?ln=org.richfaces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/jquery.effects.highlight.js.jsf?ln=org.richfaces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/JQuerySpinBtn.js.jsf?ln=org.richfaces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/calendar-utils.js.jsf?ln=org.richfaces"></script>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/calendar.js.jsf?ln=org.richfaces"></script>
<link type="text/css" rel="stylesheet"
href="/jawesa/rfRes/calendar.ecss.jsf?db=eAFLq7x7HgAFkAKM&ln=org.richfaces"
/>
<script type="text/javascript"
src="/jawesa/javax.faces.resource/password/password.js.jsf?ln=primefaces"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
</head>
{quote}
Not very similar with the previous one... So, what is the difference between both project
? Mainly the web.xml. The "richfaces showcase" project was generated from a
RichFaces artefact but the other project from another JBoss artefact (jboss-javaee6-webapp
archetype). So I decide to copy/paste the web.xml from the richfaces showcase to the
other. And biiiimmmm, RichFaces component no longuer works on this project too. The head
tag look more like the first one. The difference comes from the packaging of the resource
by RichFaces :
{quote}
<!-- Resource Mapping - resources will be served compressed and packed in
production -->
<context-param>
<param-name>org.richfaces.resourceMapping.enabled</param-name>
<param-value>true</param-value>
</context-param>
{quote}
If this is enable, the solution no longuer work. No idea why. So I disable it for now.
Another test, adding or removing the following code didn't change anything from the
user perspective (all features/styling were ok) :
{quote}
<!-- Resource Servlet - serves static resources and resources for specific
components -->
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/org.richfaces.resources/*</url-pattern>
</servlet-mapping>
{quote}
So, for now, I have disable the "org.richfaces.resourceMapping.enabled" in the
web.xml and add "<r:jQuery rendered="false" />" inside my
"<h:body>" tag. Everything work. But it is not production quality : when
leaving a page, you can see buttons loosing Primefaces style for a moment (long enough to
make a user say "OMG, such an ugly website."). If you don't understand me, I
will have to record my monitor and show you, frame by frame, the moment where all my
button turns blue (having the "classic" skin) instead of beeing gray all along.
Compatibility problem with Primefaces 3
---------------------------------------
Key: RF-11796
URL:
https://issues.jboss.org/browse/RF-11796
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component
Affects Versions: 4.1.0.CR2
Environment: JBoss AS 7, Primefaces 3.0.M4, RichFaces 4.1.0-SNAPSHOT
Reporter: Paul Dijou
Labels: compatibility, primefaces, waiting_on_user
Attachments: richfaces-showcase-jee6.war
When using a complex RichFaces component (like calendar), disable Primefaces style and
broke Primefaces javascript.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira