myfaces

Migrating JSF 1.1 with Ajax4jsf 1.x to JSF 2

风格不统一 提交于 2019-11-26 18:27:13
问题 We are migrating JSF 1.1 (MyFaces) project to JSF 2. The idea is to migrate periodically by keeping both JSP and XHTML together for some time. We use many ajax4jsf-1.1.1 tags in JSP pages. We don't use RichFaces. After configuring the system to JSF 2 (with all config changes mentioned in tutorial by Balusc) When tried to access the JSP page with ajax4jsf.jar in classpath, we get an exception: Caused by: java.lang.IllegalStateException: setViewHandler may not be executed after a lifecycle

CDI Injection into a FacesConverter

纵然是瞬间 提交于 2019-11-26 16:08:15
From just a few searches, this seems like a problem that has been around for a while. I have written a FacesConverter that looks like the following. The object Category is a JPA entity and CategoryControl is the DAO that fetches it. @FacesConverter(value = "categoryConverter") public class CategoryConverter implements Converter { @Inject private CategoryControl cc; public CategoryConverter() { } @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (cc != null) return cc.getByName(value); System.out.println("CategoryConverter().getAsObject(): no

Difference between Mojarra and MyFaces

我与影子孤独终老i 提交于 2019-11-26 15:21:38
I am starting on JSF2.0 I used a tutorial as a reference but I have the following question: The tutorial used 2 libs only: jsf-api.jar , jsf-impl.jar (but also had JSTL) from Mojarra Project. I tried to dowload them also but seems the site is not reachable. So I used Apache MyFaces but to run the example I had to add 8 jars ( commons-* , myfaces-* ). Why do I need more jars if I use MyFaces? Should I prefer Mojarra as lighter? Also the download page is indeed JSF Mojarra ? Thanks Why do I need more jars if I use MyFaces? Because those commons-* dependencies are not bundled in MyFaces. On the

Should PARTIAL_STATE_SAVING be set to false?

放肆的年华 提交于 2019-11-26 06:31:11
问题 It seems that today (April 2012), both MyFaces and Mojarra\'s JSF 2.1 implementations have defects around partial state saving and that PARTIAL_STATE_SAVING should be set to false. Is this true? 回答1: Should PARTIAL_STATE_SAVING be set to false? Only when you encounter a general defect related to partial state saving in your webapp which can really not be solved/workarounded the other way. Partial state saving has namely major advantages as to overall performance and memory usage. See also Why

CDI Injection into a FacesConverter

给你一囗甜甜゛ 提交于 2019-11-26 04:43:45
问题 From just a few searches, this seems like a problem that has been around for a while. I have written a FacesConverter that looks like the following. The object Category is a JPA entity and CategoryControl is the DAO that fetches it. @FacesConverter(value = \"categoryConverter\") public class CategoryConverter implements Converter { @Inject private CategoryControl cc; public CategoryConverter() { } @Override public Object getAsObject(FacesContext context, UIComponent component, String value) {