jsf-2

Uploading files with PrimeFaces 4.0 , and jsf 2.2 on google app engine

左心房为你撑大大i 提交于 2019-12-13 00:33:51
问题 I'm using: -primefaces 4.0 -jsf mojarra 2.2 -google app engine (servlet api 2.5) and this solution (Getting primefaces p:fileUpload to work under google appengine) doesn't help me because my version of primefaces is higher. There is exception when I'm using my form below with p:commandButton: java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getPart(Ljava/lang/String;)Ljavax/servlet/http/Part; at org.primefaces.component.fileupload.NativeFileUploadDecoder.decodeAdvanced

Validation message not being displayed in login form when the user enters wrong password

本秂侑毒 提交于 2019-12-13 00:15:50
问题 I am trying to understand why my login form does not display the validation message that says "wrong email or password" when the password is entered wrong. In all the other cases it works correctly(Just case 4 doesnt work): Case 1 works with no problem(No input given): Case 2 works with no problem(Only input given for email): Case 3 works with no problem(Only input given for password): Case 4 doesn't work (Both inputs given wrong) It is the case 4 that doesn't work correctly here is the

Getting primefaces p:fileUpload to work under google appengine

做~自己de王妃 提交于 2019-12-12 23:44:12
问题 I've read that it is possible to get primefaces fileUpload to work with google appengine with a bit of tweaking. It requires apache fileupload and common io, so I added commons-fileupload-1.2.2.jar and commons-io-1.3.2.jar to my WEB-INF/lib folder. Then following the instructions of primefaces, I added their servlet: <filter> <filter-name>PrimeFaces FileUpload Filter</filter-name> <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class> <init-param> <param-name>thresholdSize

Using JSF AJAX methods to keep JavaScript module scope

梦想与她 提交于 2019-12-12 23:39:03
问题 I am working with the application, which has JSF2 framework. The idea of that framework is to manage connection between Backend (Java) and Frontend. I know, that JSF version we are using creates jsf.ajax object in a DOM, which holds several methods for performing passing and getting data. And so, as I am building Frontend architecture based on modules pattern which has private scope each. Inside several modules I need to make AJAX call to get some data from Backend, but if I am using standart

Spring Security 3 and JSF 2 integration without redirecting page

淺唱寂寞╮ 提交于 2019-12-12 22:31:58
问题 Is it possible to integrate Spring Security 3 and JSF 2, keeping JSF working as default, instead of show the new url when the user navigates, keep the old url, without using the redirect JSF attribute to navigate through pages? I can't found documentation about this. All articles I found the author redirect the page when navigate. Thanks 回答1: By default the FilterSecurityInterceptor will only execute once-per-request and doesn't do security re-checking unless there is change in the url but

Can EL 2.2 capable JSF web applications be deployed to shared Tomcat 6 hosting environment?

☆樱花仙子☆ 提交于 2019-12-12 21:54:56
问题 I know that by replacing the el-api.jar in the lib folder of the Tomcat 6 directory with an EL 2.2 capable version that it is possible to utilize the power of EL 2.2 in Tomcat 6. See the following questions: http://code2inspire.wordpress.com/2010/11/05/how-to-enable-el-2-2-on-tomcat-6/ http://www.javaplex.com/blog/for-jsf-2-how-to-enable-el-2-2-on-tomcat-6/ I have an app that I need to deploy for a public facing site and I want to do it as cheaply as possible. The best bargain for me would be

What's the generated prefix j_idt33 in JSF component id?

夙愿已清 提交于 2019-12-12 21:25:01
问题 i define h:messages component as follows: <h:messages id="summary" styleClass="summary" globalOnly="true"/> but when i inspected element with firebug, i noticed that the id is translated to something like: j_idt33:summary what's that prefix, and why it's generated ? 回答1: That's the ID of the parent NamingContainer component like <h:form> , <h:dataTable> , <ui:repeat> , <f:subview> , a composite component, etc. JSF prepends the generated HTML client ID with the ID of the parent namingcontainer

How to invoke ActionListener for MenuItem in primefaces

被刻印的时光 ゝ 提交于 2019-12-12 21:04:40
问题 I need to implement a dynamic menumodel. In the actionlistener, i need to call a backing bean method. When I add the actionListener to the menuItem I am getting an java.lang.InstantiationException. @ManagedBean(name = "sampleBean") @ViewScoped public class Sample1 implements Serializable { private MenuModel model; public Sample1() { model = new DefaultMenuModel(); for(int i = 0; i < 3; i++){ MenuItem item1 = new MenuItem(); item1.setValue("test1" + i); item1.setAjax(false); item1.setId("item1

JSF 2.0 Opening a new browser window using external context along with faces-redirect=true

╄→гoц情女王★ 提交于 2019-12-12 21:03:12
问题 I am developing a JSF 2.0 application. On click of , I perform some logic in the backend bean action, need to redirect to another URL in a new window, and perform some clean up work in my original bean action before exiting the action. I am currently using externalContext.redirect() method along with "faces-redirect=true" (since I have some clean up code to be executed after the redirect happens). But the external URL is being opened in the same window. I would require it to open in a

Problems with composite components that include form

核能气质少年 提交于 2019-12-12 20:25:04
问题 I am writing one composite component like a complex inputtext, that requiere a complete form (it will show a search form and one list of results for the user selects one of them). <composite:implementation> <div id="#{cc.clientId}" class="#{cc.attrs.styleClass}"> <h:inputText id="txtIdentificador" ...> <h:graphicImage id="imgIdentificador" ...> <h:inputText id="txtDescripcion" ...> <h:form id="formF2ItemWidget"> ... </h:form> </div> </composite:implementation> Logically, I would like to use