java,eclipse,jsf,tomcat,omnifaces
OmniFaces 2.x requires CDI. See also Download section of OmniFaces homepage: OmniFaces 2.x Required: Java 1.7, JSF 2.2, EL 2.2, Servlet 3.0 and CDI 1.1 Optional: BV 1.0 Tomcat as being a barebones JSP/Servlet container doesn't ship with CDI out the box. It's only available in full fledged Java EE...
Is there a way of just returning null for non-existant variables instead? It does that for NameNotFoundException. The problem was here not in OmniFaces, but in the environment, which was GlassFish 4.1 in your specific case. It unexpectedly wrapped the NameNotFoundException in another NamingException, hereby causing the underlying NameNotFoundException...
jsf,composite-component,omnifaces
The includeCompositeComponent() returns an UIComponent instance representing the composite implementation. UIComponent composite = Components.includeCompositeComponent(someParentComponent, libraryName, resourceName, id); All of its attributes are available as a Map by UIComponent#getAttributes(). Map<String, Object> attributes = composite.getAttributes(); You can use Components#createMethodExpression() to create an EL method expression. Assuming that you intend to specify #{bean.complete},...
The <o:graphicImage> sets a default content type of image, but your browser apparently didn't swallow that for SVG images. As per this commit, I've for OmniFaces 2.1 added SVG support for <o:graphicImage dataURI="true"> and I've added a new type attribute which allows you to explicitly specify the image type via...
jsf,tomcat,el,jsf-2.2,omnifaces
This is more related to EL than to JSF/Spring/OmniFaces. The Apache EL implementation as used by Tomcat is indeed quite restrictive as to reserved keywords. So is for example #{bean.class.name} (as in, print bean.getClass().getName()) possible in Oracle EL implementation as used by GlassFish, but not in Apache EL implementation as...
jsf,jsf-2.2,omnifaces,graphicimage
As stated in its documentation and showcase, In case the property is a method expression taking arguments, each of those arguments will be converted to a string HTTP request parameter and back to actual objects using the converters registered by class as available via Application.createConverter(Class). So, most of standard types...
UnmappedResourceHandler doesn't support resource libraries. It's mentioned in the javadoc and showcase. And the following CSS file reference (note: the library is not supported by the UnmappedResourceHandler! this is a technical limitation, just exclusively use name): <h:outputStylesheet name="css/style.css" /> The technical limitation is that it's otherwise not possible to relatively...
java,jsf,jboss-arquillian,omnifaces
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 problems, I figured the issue was Arquillian+Wildfly, some more googling around and I found similar issues that were related to using Wildfly...
CDI doesn't inject a naked CDI bean as a dependency, but a proxy that redirects to the contextual object of the active scope. This proxy class does not have your annotation. See https://issues.jboss.org/browse/CDI-10 for how to unwrap the proxy....
java,jsf-2,converter,selectonemenu,omnifaces
I solved it adding this to my entites (hashCode and equals) @Override public int hashCode() { int hash = 5; hash = 83 * hash + this.codigo; return hash; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return...
The problem is fixed if I add login and login.xhtml to allowed resources: <web-resource-collection> <web-resource-name>Allowed resources</web-resource-name> <url-pattern>/javax.faces.resource/*</url-pattern> <url-pattern>/login.xhtml</url-pattern> <url-pattern>/login</url-pattern> </web-resource-collection> ...
jsf,jsf-2,versioning,omnifaces,unmappedresourcehandler
It's mentioned in the javadoc and showcase. And the following CSS file reference (note: the library is not supported by the UnmappedResourceHandler! this is a technical limitation, just exclusively use name): <h:outputStylesheet name="css/style.css" /> The technical limitation is that it's otherwise not possible to relatively reference resources from inside the...
You need the page id you're navigating from somewhere. At first look, keeping it in Session seems to be a good idea, however, this could remain in coflict if you're navigating in multi-tab (sharing same Http Session through different browser tabs). Having said that, the most proper solution for your...
jsf,jsf-2,primefaces,omnifaces
This is how I got it worked for me. In the implementation of the Omnifaces ListConverter, the getAsObject method is using the list to find the value and update the target and source of dualList. NOTE: you will get either a new value added in target (List=".getSource") or a new...
eclipse,java-ee,jsf-2,enums,omnifaces
Basically, this requires a custom Eclipse plugin which recognizes the <o:importConstants> tag and prepopulates the autocomplete menu. As of now, no such plugin exist and there are as far as I know no plans (at least not from our side) for writing IDE specific plugins for OmniFaces tags/components. I must...
jsf-2,primefaces,omnifaces,megamenu,graphicimage
As far as I understand, you was trying to use something like: <p:menuitem ... icon="#{imageStreamer.getImage(23)}" /> This indeed won't work. It would be evaluated immediately when the renderer obtains it. This is also not how <o:graphicImage> works. It postpones the evaluation to the moment the browser actually needs to request...
jsf,jsf-2.2,omnifaces,graphicimage
I can store all the images in the database with no problem. This was thus actually not true. Those images appear to be empty or filled with only zeroes. How to grab the uploaded file content from a <p:fileUpload>, head to the following answers: How to use PrimeFaces p:fileUpload?...
OmniFaces needs to change the check code as it is non-portable. The CDI Specification does not define that the BeanManager nor any Context needs to be available in a ServletContainerInitializer. This is highly depending on the target environment and integration scenario and thus highly non-portable. This is also a regression...
jsf,composite-component,omnifaces
You need to trigger it during the view build time. The postAddToView event listener approach must work. Perhaps you did it the wrong way. Here's a kickoff example: <h:panelGroup> <f:event type="postAddToView" listener="#{bean.build}" /> </h:panelGroup> With this, assuming that you have a form.getType() of form1 and thus want to include <my:form1...
This is a bug in MyFaces. I can't tell which MyFaces version exactly contains the fix, but I can tell that this construct works fine in at least MyFaces 2.1.12. However, upgrading MyFaces in WebSphere might not be a trivial task (technically and bureaucracy). Your best bet is to tell...
jsf,error-handling,web.xml,omnifaces
The <error-page><location> must match the FacesServlet mapping in order to get FacesServlet to run on the error page too during an exception on a synchronous request (which doesn't use ViewHandler#renderView(), but RequestDispatcher#forward()). Alter the mapping accordingly: <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> Using /faces/* (and *.faces) is soo JSF 1.0/1.1. If...
java.lang.ClassNotFoundException: org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory The ClassNotFoundException means that the mentioned class, or at least the JAR file containing the mentioned class, isn't present in the current runtime classpath. When deployed as a WAR file, the webapp's runtime classpath covers among others the following paths: WAR's /WEB-INF/classes - for loose .class files...
When and by whom is the list member variable filled? By <o:converter list> attribute, exactly as shown in Usage section at showcase. <p:pickList value="#{bean.dualListModel}" var="entity" itemValue="#{entity}" itemLabel="#{entity.someProperty}"> <o:converter converterId="omnifaces.ListIndexConverter" list="#{bean.dualListModel.source}" /> <!-- ===================================================^^^^ --> </p:pickList> The <o:converter> is a special taghandler which allows setting arbitrary properties on the...
It's consequence of a bugfix in Weld implementation of WildFly 9. As per issues CDI-525, WELD-1941 and WFLY-4877, the CDI spec appears to be not consistent with JavaBeans specification as to default managed bean name in case the unqualified classname starts with more than two capitals. CDI spec merely stated...
This is a bug in MyFaces. I can't tell which MyFaces version exactly contains the fix, but I can tell that this construct works fine in at least MyFaces 2.1.12. However, upgrading MyFaces in WebSphere might not be a trivial task (technically and bureaucracy). Your best bet is to tell...
java-ee,jboss,wildfly,omnifaces
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.omnifaces.taghandler.ValidateUniqueColumn.processValueChange(Ljavax/faces/event/ValueChangeEvent;)V" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/omnifaces/taghandler/ValidateUniqueColumn, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface...
at org.omnifaces.config.WebXml.parseErrorPageLocations(WebXml.java:434) WebXml is a utility class in omnifaces which provides methods to frequently used web.xml elements. The above line in the stacktrace shows that you have configured an exception class which does not exist in the classspath. Please post your <error-page/> tag snippet in web.xml...
This is a bug in the JAXP parser used. This is supposed to work normally. The SAP JAXP parser is apparently somehow not recognizing a text node as a text node. The getTextContent() will namely return null on e.g. a document node and document type node. The work around of...
It's caused by the isXxx() getter incorrectly returning a Boolean instead of boolean. The fix is available as per today's 2.1-SNAPSHOT and will be in 2.1 release....
validation,jsf,omnifaces,message-bundle
This is currently not supported by OmniFaces validator components. As you can see in the source code of ValidateMultipleFields#showMessage(), it's nowhere obtaining the default message from the message bundle as identified by Application#getMessageBundle(). I reported an issue so that the OmniFaces guys are noticed about it and may implement it...
The <o:validateXxx> components are sensitive to their location relative to the target input components. This is very useful to prioritize validation depending on component's own converter and validators. When placed before the target input components, then they will validate the raw unsubmitted values, and they will run before any of...
jsf,omnifaces,graphicimage,conditional-rendering
You'd really better not call that image streamer method in a rendered attribute. It's invoked multiple times during the JSF lifecycle, hereby inefficiently getting the image bytes from the DB every time. The model also doesn't look right in first place. I suggest to change the model. Make the image...
jsf,jsf-2,jax-rs,cdi,omnifaces
@ViewScoped is tied to a JSF view, however durig a JAX-RS request, there's no means of a JSF view anywhere. There's no JSF view being restored during a JAX-RS request as the JAX-RS request is not initiated by submit of a JSF <h:form> which holds information about the JSF view...
It's not possible to disable it without hacking around in OmniFaces source. As per issue 92 this has been fixed by letting <o:enableRestorableView> setting an application wide attribute once it's been used somewhere, so that the RestorableViewHandler can decide whether to try to restore the view or not. Note that...
jsf-2,memory-leaks,composite-component,omnifaces,unmappedresourcehandler
UnmappedResourceHandler memory leak on composite components is confirmed and has been solved by this commit for 2.1, this commit for 1.11 and this commit for 1.8.3. All versions are as of today available in Maven....
primefaces,filter,datatable,omnifaces,http-request-parameters
Ok so i found out that filteredValue was reseted on each ajax call because of the @RequestScoped. I think i was kind of mixing up things. So i switched all @ManagedBeans to @Named then i created a new @SessionScoped Bean with most of the attributes and i @inject a @RequestScoped...
The <o:outputFormat var> is set during render response phase. However, the <o:validateXxx message> is evaluated during validations phase, which is too early. Better use #{of:format1()} function instead. <o:validateOrder id="validacionFechaFacturaMayorAFechaEmisionUltimoComprobante" type="lte" components="fechaFactura fechaEmisionComprobanteUltima" message="#{of:format1(msgs['comun.abm.fecha.factura.menor.ultimo.comprobante'], generacionPadronController.fechaEmisionComprobanteUltima)}"...