jsf-2.2

Implicit expression language object “component” not working in jsf 2.2.6

可紊 提交于 2019-12-11 22:22:12
问题 I'm migrating a jsf 2.0 application to jsf 2.2.6. There is a extensive use of implicit EL object component as styleClass="#{component.valid?'':'err'}". In jsf 2.2.6 (jsf-impl-2.2.6-jbossorg-4.jar) valid is not recognized, throwing "ServletException: The class 'javax.faces.component.html.xxx' does not have the property 'valid". Is this functionality deprecated in jsf 2.x.x? Can be related to JBoss EL? 回答1: It seems that you trying the component.valid on element that does not support it at all,

ui repeat to show one more value and method is not invoking in managed Bean in JSF2.2

跟風遠走 提交于 2019-12-11 20:38:20
问题 <ui:repeat value="#{cc.attrs.bean.foo.foo1}" var="test" varStatus="test1"> <h:outputText value="#{test.prime}" title="#{test.primeNumber}" /> <h:outputText value="," rendered="#{!test1.last}" /> </ui:repeat> I am getting a value example1,example2 Now after adding a new line: <ui:repeat value="#{cc.attrs.bean.foo.foo1}" var="test" varStatus="test1"> <h:outputText value="#{cc.attrs.bean.testNo(test)}" rendered="#{test1.first}" /> <h:outputText value="#{test.prime}" title="#{test.primeNumber}" /

PrimeFaces uploadFile: how can I save the uploaded image file to some directory in web app and retrieve it back

耗尽温柔 提交于 2019-12-11 19:39:34
问题 I have a web app and want to save images to my DB and then want retrieve the saved image back from the DB. I am able to upload the image to my web app by PrimeFaces fileUpload and save image properties to my DB. However, I cannot save the uploaeded image to some directory in my web app so that later I can retrieve its path and properties from DB and the image from the directory. I am getting the following error: javax.el.ELException: /compositions/defineType.xhtml @122,56 fileUploadListener="

JSF 2.2 webapp works on Local Machine but not on the Server

老子叫甜甜 提交于 2019-12-11 18:44:00
问题 I am trying to create a web application using jsf 2.2. My application is using JERSEY Restful, jre 1.8, JSF 2.2, Primefaces. It works perfectly fine on my local machine but on AWS(EC2- Tomcat by bitnami-free tier) I get the error(Error log at the bottom.) Thank you so much for your help in Advance. I'm using the following libraries Here's my Web.xml file code: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml

PicketLink protection stops JSF 2.2 resource contract from being loaded

半腔热情 提交于 2019-12-11 13:10:46
问题 I have a JSF 2.2 webapp with a contract and several pages, located directly in the WebContent folder. The contract consists of an image, a template file template.xhtml and a css file global.css . So far everything is working as expected. Now I want to use PicketLink for user authentication and authorization and have followed a tutorial (http://www.ocpsoft.org/security/simple-java-ee-jsf-login-page-with-jboss-picketlink-security/), but when accessing my pages the image and css files are unable

JavaServer Faces 2.2 composite component rendered with enclosing <html> … </html> tags

僤鯓⒐⒋嵵緔 提交于 2019-12-11 11:52:27
问题 While migrating a project from JavaServer Faces 2.1 / Java EE 5 to JavaServer Faces 2.2 / Java EE 7 web profile on GlassFish 4, I encountered invalid HTML code because of additional <html> ... </html> tags for every instance of a composite component in the JSF code. Environment: Mojarra 2.2.0 (GlassFish 4.0), NetBeans 7.3.1, JDK 7 Steps to reproduce: create a new "Java EE 7 Web" project with JavaServer Faces and choose JSF 2.2 server library in index.html, select the HTML body text ("Hello

How can I use method-parameter level validation with JSF 2.2?

好久不见. 提交于 2019-12-11 11:50:35
问题 I have created a bean validator that I apply to my bean setter method. Instead of getting a JSF validation error, I get an exception raised. Is there a way to make this work, or I should go with a traditional JSF validator? //Bean Method public void setGuestPrimaryEmail(@ValidEmail String email){ guest.getEmails().get(0).setValue(email); } //Validator interface @Target({ElementType.FIELD,ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Constraint(validatedBy = EmailValidator.class

Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: inputFile

試著忘記壹切 提交于 2019-12-11 11:36:58
问题 I am really stumped by this problem. We have richfaces project. I wanted to use the tag instead of the because I didn't like the way the files were being passed to the bean. Our project works very well. I believe I have all of the needed depedencys in the POM, but I even manually added a few after reading this by How to setup project to support h:inputfile in JSF 2.2 @BalusC so I added <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> <version>1.2_15</version> <

How to use Spring Webflow popup=“true” with Primefaces?

纵饮孤独 提交于 2019-12-11 10:45:36
问题 Until now we were using Spring Webflow 2.3, which brought the "sf" namespace and Spring.js, which could be used to display view-states in a popup. Webflow 2.4 deprecated Spring.js and removed the taglib with the following statement: Previous releases of Spring Web Flow shipped with a component library which provided Ajax and client-side validation capabilities for JSF 1.2 environments. Applications using these components will need to switch to a 3rd party JSF component library such as

Flow depending on external parameter?

心已入冬 提交于 2019-12-11 10:31:47
问题 I'm building a simple POC to experiment with Faces Flow. page 1: displays a list of companies. The user selects company A then goes to page 2. page 2: on the selected company page, the user clicks a commandLink to start a wizard to create a new employee to be added to the company A. Behing the scenes I've got a @FlowScoped("addNewUsertoCompanyFlow") bean MyFlowBean . In its @PostConstruct method, the MyFlowBean needs to fetch an object corresponding to the company A from a service ( @Inject )