omnifaces

java.lang.NoClassDefFoundError: Could not initialize class org.omnifaces.config.WebXml

只谈情不闲聊 提交于 2019-12-11 02:16:57
问题 I have added recently added omnifaces 1.4.1 to my pom to use some of the converters. <dependency> <groupId>org.omnifaces</groupId> <artifactId>omnifaces</artifactId> <version>1.4.1</version> </dependency> Now, every request to the application throws an exception which starts at java.lang.NoClassDefFoundError: Could not initialize class org.omnifaces.config.WebXml The omnifaces.SelectItemsIndexConverter I'm using is working fine, but this exception is being thrown for every request; even on

How to defer PrimeFaces.settings and Client Side Validation scripts with o:deferredScript

谁都会走 提交于 2019-12-11 00:54:45
问题 I'm trying to use OmniFaces to defer PrimeFaces scripts, as seen in this answer. But PrimeFaces render an inline script in head, like this (script beautified and commented by me): <script type="text/javascript"> if(window.PrimeFaces) { // this line is always rendered in Development mode. PrimeFaces.settings.projectStage='Development'; // these lines are added if Client Side Validation is enabled. PrimeFaces.settings.locale='pt_BR'; PrimeFaces.settings.validateEmptyFields=true; PrimeFaces

Omnifaces validateBean: attach message to specific component

浪尽此生 提交于 2019-12-10 22:34:49
问题 I am using Omnifaces <o:validateBean /> to use JSR303 bean validation with a class level constraint. The whole thing works quite good. The validation message is displayed in a Primefaces <p:messages /> component. Now I wanted to know whether it is possible to narrow the error message to a more precise component (i. e. a <p:message /> tag on a specific element)? In the example below I want to direct the error message to the <p:message /> component with id="id_msg_anniversary" (or if that is

Omnifaces library in JSF, Java classpath Cannot find type

自作多情 提交于 2019-12-10 21:02:24
问题 I try to recover the constants in my xhtml jsf in using Omnifaces library, but when I run my project I get: Cannot find type 'fr.epsi.utils.ConstantsPages' in classpath. Here is my xhtml page : <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:o="http://omnifaces.org/ui"> <o:importConstants type="fr.epsi.utils.ConstantsPages" /> <h:head> <title>Acceuil</title> <h:outputStylesheet name="css/style.css"/> </h:head> <h:body> <h:panelGrid columns="3"

Distinguish between conversion failure and validation failure in o:viewParamValidationFailed

丶灬走出姿态 提交于 2019-12-10 18:49:11
问题 I am using the OmniFaces <o:viewParam> taghandler in my current project. I like it, it's great. And even greater is the <o:viewParamValidationFailed>. Now, we are able to send an error if validation or conversion fails. But I wonder, whether it is possible to distinguish between conversion failure and validation failure. Let's say we want to send a Bad Request if the given view param in malformed and can not be converted; for that matter send a Not Found if conversion succeeded, but the

WELD-001409 Ambiguous dependencies for type [EagerBeansRepository]

ぃ、小莉子 提交于 2019-12-10 15:54:14
问题 I'm trying to migrate my JSF application to CDI. I have implented the following changes: Added an empty beans.xml file to WEB-INF Changed @ManagedBean 's to @Named Changed All the scopes I have to CDI Scopes (Session, View, Request) Changed all @EJB and @ManagedProperty to @Inject However, an Omnifaces error is preventing deployment as I'm getting the following error three times: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [EagerBeansRepository]

Injecting @EJB in OmniFaces @Eager bean causes “Severe: No valid EE environment for injection of org.omnifaces.cdi.eager.EagerBeansRepository”

 ̄綄美尐妖づ 提交于 2019-12-10 14:54:33
问题 Using @ApplicationScoped @Named @Eager , my @EJB -injected @Stateless beans are not properly instantiated and evaluate to null . I had an @ApplicationScoped @ManagedBean(eager=true) that was used to schedule a few jobs. Some @Stateless beans were injected using @EJB annotation, and that worked fine. In the move to CDI annotations, I added the OmniFaces @Eager annotation as substitute for @ManagedBean(eager=true) which is missing in standard CDI: import javax.annotation.PostConstruct; import

WARNING: Parameter 1 of type List<Bean<?>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setXxx is not resolvable to a concrete type

早过忘川 提交于 2019-12-10 12:50:03
问题 I'm using Omnifaces 1.8.1 and Whenever I deploy my application to Glassfish I get the following warning which causes some delay in the deploy process. Warning: WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener.DefaultHttpSessionListener. It will not be possible to produce instances of this type! Warning: WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener

Adding composite component programmatically

时光总嘲笑我的痴心妄想 提交于 2019-12-10 10:08:44
问题 I would like to include below composite component programmatically: <composite:interface> <composite:attribute name="sampleBean" /> <composite:attribute name="autoCompleteMethod" method-signature="java.util.List autoCompleteMethod(java.lang.String)" /> </composite:interface> In Omnifaces, there is a function: // Programmatically include composite component. Components.includeCompositeComponent(someParentComponent, libraryName, resourceName, id); However, it isn't clear to me how to specify

java.util.ServiceConfigurationError when running tests using arquillian+omnifaces

拥有回忆 提交于 2019-12-10 04:52:50
问题 I am getting the following error "java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Provider org.omnifaces.ApplicationInitializer not found" when running Arquillian tests. I have put the most basic test case I could here: https://www.dropbox.com/s/kou5v8kqs5g4g4m/test.zip?dl=0 回答1: After trying to run a built war and running it on Wildfly standalone, I managed to narrow the problem to Arquillian, after testing Arquillian+Glassfish embedded and running without