prettyfaces

High CPU usage when JRebel is on

时间秒杀一切 提交于 2019-12-12 01:11:27
问题 When turning on JRebel for my JSF project, CPU usage gets too high on each requests & drops down when request has been served. I did looked though the profiler but it was not caused due to my project classes itself. But I could even figure out the culprit looking at the profiling results. Here are the profiling results : Interestingly the problem disappears when I either disable JRebel, or remove a 3rd party URL rewrite library ( com.ocpsoft.pretty.faces.* ). But then I created a new fresh

@URLAction is not called

瘦欲@ 提交于 2019-12-12 00:24:14
问题 I have a problem hitting to load method when the page loads/refreshes, page loads correctly from xhtml file, but load method is never get called. Any ideas? @ManagedBean @ViewScoped @URLMapping(id = "deactivate", pattern = "/deactivateaccount", viewId = "/deactivateaccount.xhtml") public class DeactivateAccount{ @URLAction public void load(){ //This method does not hit when page loads } } 回答1: Turns out that same mapping id used somewhere else, and it was crashing silently while server starts

Duplicated mapping id with PrettyFaces

拟墨画扇 提交于 2019-12-11 12:03:55
问题 i am using PrettyFaces 3.3.0 with Spring Security 3 i have two beans UserBean which is mapped to serve to pages (users,add) and LoginBean to serve the login page my mappings is as follows: 1- UserBean: @Component("user") @Scope("request") @URLMappings(mappings = { @URLMapping(id = "users", pattern = "/users", viewId = "/faces/users.xhtml"), @URLMapping(id = "add", pattern = "/add", viewId = "/faces/add.xhtml") }) public class UserBean { 2- LoginBean: @Component("login") @Scope("request")

Prettyfaces issue when using with viewparam converter

霸气de小男生 提交于 2019-12-11 11:41:22
问题 i'm using jsf 2.1, prettyfaces 3.3.3 and hibernate jpa 3.6.7. i have country page and i'm trying to send comment with commandbutton. country.xhtml: <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:f="http://java.sun.com/jsf/core"> <f:metadata> <f:viewParam name="country" value="#{countryBean2.selectedCountry}" converter="countryConverter" required="true" /> </f:metadata> <h:head> <title>Country</title> </h:head

Primefaces FileUpload is not working with PrettyFaces and Spring Boot

走远了吗. 提交于 2019-12-10 19:22:47
问题 I am using Spring Boot 1.5.2.RELEASE with JSF 2.2.14 and Primefaces 6.1 and PrettyFaces 3.4.1.Final. My pom file is as follows: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>org.springframework</groupId> <artifactId>myapp</artifactId> <version>1</version>

Pretty Faces: Generic URL mapping

旧时模样 提交于 2019-12-10 17:03:33
问题 Using Pretty Faces 3, I have some mappings like these: <url-mapping id="search"> <pattern value="/search" /> <view-id value="/views/search.xhtml" /> </url-mapping> <url-mapping id="edit"> <pattern value="/edit" /> <view-id value="/views/edit.xhtml" /> </url-mapping> Is there any way to define all them using some wildcard, like this? <url-mapping id="generic"> <pattern value="/*" /> <view-id value="/views/$1.xhtml" /> </url-mapping> I know is possible to use EL in the view-id value, but I can

JSF 2.2 h:inputFile not working with pretty faces [duplicate]

守給你的承諾、 提交于 2019-12-08 20:33:22
问题 This question already has answers here : Fileupload and PrettyFaces and JSF 2.2 [duplicate] (2 answers) Closed 3 years ago . we're using a Glassfish 4.0 with JSF 2.2 (Mojarra 2.2.0) and PrettyFaces 2.0. When trying to upload a file using h:inputFile with the corresponding form enctype="multipart/form-data" , the form action is only fired if the page is called directy, but nothing happens if the pretty url is called. Many other questions have some similar issues (e.g. How to use PrimeFaces p

Should I use f:event or action element in PrettyFaces?

心不动则不痛 提交于 2019-12-08 03:58:09
问题 At the moment I am using the following code: public void init() { question = questionBean.findQuestion(questionParamId); } Which is invoked by this: <f:metadata> <f:viewParam name="id" value="#{questionShowBackingBean.questionParamId}" /> <f:event type="preRenderView" listener="#{questionShowBackingBean.init}" /> </f:metadata> So the URL is: http://www.mycompany.com/show.xhtml?id=8 Now I have begun using PrettyFaces and I have seen the <action> element in the URL-mapping element I wonder if I

Should I use f:event or action element in PrettyFaces?

送分小仙女□ 提交于 2019-12-06 06:32:00
At the moment I am using the following code: public void init() { question = questionBean.findQuestion(questionParamId); } Which is invoked by this: <f:metadata> <f:viewParam name="id" value="#{questionShowBackingBean.questionParamId}" /> <f:event type="preRenderView" listener="#{questionShowBackingBean.init}" /> </f:metadata> So the URL is: http://www.mycompany.com/show.xhtml?id=8 Now I have begun using PrettyFaces and I have seen the <action> element in the URL-mapping element I wonder if I could have written <action>#{questionShowBackingBean.init}</action> instead? If so should I remove

CDI ViewScope & PrettyFaces: Multiple calls to @PostConstruct (JSF 2.2)

对着背影说爱祢 提交于 2019-12-06 03:04:50
I'v already check similar questions which declare that JSF 2.1 had this bug, but I'm using JSF 2.2 Let's detail: My environment: CDI: 1.1 Dynamic Web Module: 3.0 Java: 1.7 JSF: 2.2 PrettyFaces: 2.0.12.Final My Bean: @Named(value = "home") @javax.faces.view.ViewScoped public class HomeBean implements Serializable { @Inject private HomeController controller; private List<Store> myPopularStores; @PostConstruct public void postConstruct() { myPopularStores = controller.getStores(); LOG.log(Level.FINE, "HomeBean: initialized"); } public String buttonClicked() { // whatever } } That controller,