Is there a problem between PrimeFaces and Facelets?

UI Components for JSF
laura
Posts: 15
Joined: 24 May 2009, 06:58

13 Jun 2010, 07:55

Hi, I use primefaces 1.0.2 with mojarra-1.2_14 and a facelets template like this:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 

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


<f:view contentType="text/html">

	
<head>
	<ui:insert name="head">...</ui:insert>
</head>
<body>
	<ui:insert name="content">...</ui:insert>
</body>
</f:view>
</html>

But within my pages the p:commandButton doesn't work, when other buttons like a4j:commandButton works fine! I mean the method which p:commandButton calls doesn't run at all. what's my problem? but when I use <head> and <body> in my pages instead of ui:define everything is ok. Could you please help me?

callahan
Posts: 768
Joined: 27 May 2010, 22:52

13 Jun 2010, 11:51

Hi,

I haven't experienced any such problems with templates myself. Is your commandButton in a form? If not, put it in a form and see if it works.

laura
Posts: 15
Joined: 24 May 2009, 06:58

13 Jun 2010, 12:03

bmacmanus wrote:Hi,

I haven't experienced any such problems with templates myself. Is your commandButton in a form? If not, put it in a form and see if it works.
Thanks, But of course it is within a form! I'm an experienced developer :cry: it is like this:

Code: Select all

<h:form>
<p:commandButton value="TEST_P" actionListener="#{myController.save}" />
<a4j:commandButton value="TEST_A4J" actionListener="#{myController.save}" />
</h:form>
The a4j:commandButton works fine but the p:commandButton doesn't work! I test some of the PrimeFaces components within this page and they works correctly!

callahan
Posts: 768
Joined: 27 May 2010, 22:52

13 Jun 2010, 12:37

Sorry Laura, I wasn't trying to question your abilities :oops: ! Have you seen this post http://primefaces.prime.com.tr/forum/vi ... f=3&t=2004. Other people also appear to be having problems using RichFaces together with PrimeFaces. I don't actually use RichFaces myself.

laura
Posts: 15
Joined: 24 May 2009, 06:58

13 Jun 2010, 12:46

bmacmanus wrote:Sorry Laura, I wasn't trying to question your abilities :oops: ! Have you seen this post http://primefaces.prime.com.tr/forum/vi ... f=3&t=2004. Other people also appear to be having problems using RichFaces together with PrimeFaces. I don't actually use RichFaces myself.
But I don't have any problem using RichFaces together with PrimeFaces. That's just an example to test the method save() in backing bean. I don't know why RichFaces button can invoke the method but PrimeFaces can't?!

callahan
Posts: 768
Joined: 27 May 2010, 22:52

13 Jun 2010, 12:53

Ok, this might be another stuid question, but does the p:commandButton work if you remove the a4j:commandButton?

laura
Posts: 15
Joined: 24 May 2009, 06:58

13 Jun 2010, 13:03

bmacmanus wrote:Ok, this might be another stuid question, but does the p:commandButton work if you remove the a4j:commandButton?
No, I put a4j:commandButton within that form just for test, after I seen p:commandButton doesn't work correctly.

callahan
Posts: 768
Joined: 27 May 2010, 22:52

13 Jun 2010, 13:36

Hmm, and either the head in the template or the ui:define for the head contains <p:resources />?

laura
Posts: 15
Joined: 24 May 2009, 06:58

13 Jun 2010, 13:42

bmacmanus wrote:Hmm, and either the head in the template or the ui:define for the head contains <p:resources />?
Yes, of course! ui:define for the head contains <p:resources />.

ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

14 Jun 2010, 07:47

Hi Laura,

can you give us some information to the used version and you configuration?


Cheerio,
Ramo

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests