omnifaces

Problems with Omnifaces GzipResponseFilter and page redirect (Glassfish only)

[亡魂溺海] 提交于 2019-12-11 17:26:37
问题 I get an error when I try to redirect a page in JSF action with a h:commandLink when I use the Omnifaces GzipResponseFilter (only in Glassfish). Exception: java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END Environment Glassfish 3 Omnifaces 1.7 (GzipResponseFilter) Mojarra 2.1.27 JDK 6 web.xml <filter> <filter-name>gzipResponseFilter</filter-name> <filter-class>org.omnifaces.filter.GzipResponseFilter</filter-class> </filter> <filter-mapping> <filter-name

JSF 2.3 CDI not working on tomcat

倖福魔咒の 提交于 2019-12-11 14:48:54
问题 I am trying to set up jsf 2.3 on tomcat 8 whenever I used @inject I keep having an error with it I have googled and searched on stackoverflow.com yet I can't find a solution to it. I have already installed CDI (Weld) on it following @BalusC example from here How to install and use CDI on Tomcat? yet I keep having unsatisfied dependency: no bean matches the injection point. I can't figure it out is there anything i am missing? ConfigurationBean.java import static javax.faces.annotation

Using Facelets as <error-page><location> causes IllegalStateException: getWriter() has already been called for this response

狂风中的少年 提交于 2019-12-11 10:03:21
问题 I'm trying to setup the Omniface's FaceExceptionFilter on my Glassfish 4.0 server, using Mojarra 2.2.8, Primefaces 4.0 and Omnifaces 1.8.1. The filters and error pages in web.xml are defined as follow: <filter> <filter-name>facesExceptionFilter</filter-name> <filter-class>org.omnifaces.filter.FacesExceptionFilter</filter-class> </filter> <filter-mapping> <filter-name>facesExceptionFilter</filter-name> <servlet-name>Faces Servlet</servlet-name> </filter-mapping> <filter> <filter-name

How to display all enum values as <f:selectItems> with enum property as label

萝らか妹 提交于 2019-12-11 07:18:26
问题 I have a RoleStatus enum which is as being a property of Role entity mapped to an integer in the DB (but that part is irrelevant). I'd like to present a List<Role> in a <p:dataTable> in which one column should have a <h:selectOneMenu> for the RoleStatus property of the Role entity. How can I implement this with or without OmniFaces? Here's the enum: public enum RoleStatus { ACTIVE(1, "Active"), DISABLE(2, "Disable"); private final int intStatus; private final String status; private RoleStatus

Omnifaces validateBean: can not get showMessageFor attirbute to work

痴心易碎 提交于 2019-12-11 05:14:09
问题 I am using Omnifaces <o:validateBean /> to use JSR303 bean validation with a class level constraint. My question is based on a former question about how to attach message to specific components. Since Omnifaces 2.6 there is a showMessageFor attribute which solves my question at that time completely (so big thanks to the developers of Omnifaces library ;-). My problem is that I can not get it to work. Here is my setting. I have three input fields, two of them are coupled in a class level

JSF Error page not shown when ViewExpiredException occurs

泪湿孤枕 提交于 2019-12-11 04:53:39
问题 I have the following error when view within a page is expired. The message says that the Error page '/home.xhtml' will be shown. but actually nothing is shown, the page remains the same, and it is just frozen. I am using FullAjaxExceptionHandler from Omnifaces , described by balusC. I am using Primefaces 3.5 and Mojarra 2.1.17. Mär 11, 2013 1:40:30 PM org.apache.catalina.core.ApplicationContext log SEVERE: FullAjaxExceptionHandlerx: An exception occurred during processing JSF ajax request.

POJO support for primefaces autocomplete using omnifaces

余生长醉 提交于 2019-12-11 04:00:45
问题 I am trying to use primefaces autocomplete component in my project, in order to avoid writing specific converter to each list object I am trying to use omnifaces as suggested in here and here by 'BalusC', I tried to replicate exactly same way but could not able get this work. please review below code snippet and advice if I am missing anything here? First part of the code [f:selectOneMenu] is working absolutely fine without anyissues XHTML <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h=

EL expressions in Omnifaces CDN resource handler not resolved in Wildfly 9

人走茶凉 提交于 2019-12-11 03:33:08
问题 I am playing around with new Wildfly 9.0.0.Final. After the deployment of my JSF2.2 web application, the Omnifaces2.1 CDNResourceHandler stopped resolving EL expression. My definition in web.xml: <context-param> <param-name>org.omnifaces.CDN_RESOURCE_HANDLER_URLS</param-name> <param-value> styles:*=#{CDNResourcesBean.styles}/* </param-value> </context-param> In .xhtml, style.css file exists in resources of the project structure <h:outputStylesheet library="styles" name="style.css"/> Generated

JSF - Keep Faces Messages after redirect from @PostConstruct

南楼画角 提交于 2019-12-11 03:27:52
问题 I have page1 with button that navigates to page2, page 2 add some messages and navigates back to page1. I want display those messages on page1. I've tried many solutions, but nothing work. Sample code page1.xhtml: <p:commandButton value="edit" action="#{bean1.edit}"/> In the managed bean: public String edit() { return "page2?faces-redirect=true"; } page2 managed bean @PostConstruct private void postConstruct() { Faces.getFlash().setKeepMessages(true); Messages.addFlashGlobalError("cannot edit

Omnifaces 2.x fails when used in a Spring Boot environment with Weld

筅森魡賤 提交于 2019-12-11 03:14:30
问题 Finally I successfully bootstrapped Weld in a Spring Boot environment as explained here. CDI works with no problem both for JSF using Mojarra and for Web Services using Jersey. But now I encountered a problem when trying to include Omnifaces 2.6 in my application. My application start fails with this message: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly. at com.sun.faces.config.processor.FactoryConfigProcessor