mojarra

Adding custom attribute (HTML5) support to JSF 2.0 UIInput component

流过昼夜 提交于 2019-11-26 18:57:00
I am trying to write a renderer which would process the placeholder attribute on an <h:inputText> component. I headed to this path after reading JSF 2.0 strips out needed HTML5 attributes and it seems correct. Here's my custom renderer public class InputRenderer extends com.sun.faces.renderkit.html_basic.TextRenderer{ @Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { System.out.println("Rendering :"+component.getClientId()); String placeholder = (String)component.getAttributes().get("placeholder"); if(placeholder != null) { ResponseWriter

Should PARTIAL_STATE_SAVING be set to false?

寵の児 提交于 2019-11-26 18:43:27
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? BalusC 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 JSF saves the state of UI components on server? I can't 100% reliably speak for MyFaces, but in

f:viewParam doesn't pass required parameter when new xmlns.jcp.org namespace is used

时光怂恿深爱的人放手 提交于 2019-11-26 17:17:34
问题 I am trying to use Glassfish 4.0 with Java EE 7 XML namespaces to test the sample below. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:f="http://xmlns.jcp.org/jsf/core"> <h:head> <title>Title</title> </h:head> <h:body> <h:form> <ul> <ui:repeat value="#{appLoad.movieList}" var="movie"> <li> <h:link value="#{movie.title}" outcome="movie" includeViewParams="true"> <f:param name="id" value="#{movie.id}"/> </h

Clicking h:commandLink causes Uncaught ReferenceError: mojarra is not defined

大兔子大兔子 提交于 2019-11-26 17:06:49
问题 I am aware of this post and I double checked all the possibilities there. I'm using JSF 2.0 with Mojarra implementation on Glassfish 3. I'm trying to use two simple <h:commandLink> tags to change the application language. This is the .xhtml page: <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title> <h:outputText value = "#{appMessage['page.welcome']}" /> </title> <f:metadata> <f

What is the usefulness of statelessness in JSF?

北城以北 提交于 2019-11-26 16:40:38
According to this blog JSF is going stateless . Isn't the whole point of using JSF is that it makes saving and restoring state a chore . What is the point of JSF becoming stateless ? Can you please provide an example where this can be useful . BalusC First of all, I would like to clarify that JSF isn't exactly "going stateless" at its whole own. JSF just adds a new feature enabling the developers to create stateless views/forms on demand. State saving is particularly helpful in dynamically manipulated forms with e.g. conditionally ajax-rendered parts. It remembers the state of the form across

JSF and automatic reload of xhtml files

[亡魂溺海] 提交于 2019-11-26 16:13:53
问题 I had some problems with hot-reloading XHTML files using JRebel, Spring, JSF Mojarra 2.0.3 and WebLogic 10.3. JRebel reloads regular Java classes and js/css files under /WebContent successfully, but not JSF's .xhtml files. A full republish was necessary to get xhtml files updated on the server. By trial and error I finally got it to work by adding some facelets parameters to web.xml and creating a custom ResourceResolver as described in this blog post. However, I wonder WHY this works, and

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

Exception about flash in Mojarra JSF

梦想的初衷 提交于 2019-11-26 14:08:50
问题 I upgraded to Mojarra JSF 2.2.1 (from 2.1.22) and since then for each of my requests I'm having an exception in console: GRAVE: JSF1094: Could not decode flash data from incoming cookie value /?. Processing will continue, but the flash is unavailable for this request. com.sun.faces.lifecycle.InvokeApplicationPhase execute Request finishes succesfully when I'm not using flash scope on it. However, as I'm using this scope for FacesMessages , if I put a message here, I have a

com.sun.faces.numberOfViewsInSession vs com.sun.faces.numberOfLogicalViews

僤鯓⒐⒋嵵緔 提交于 2019-11-26 12:57:39
Mojarra Implementation of JSF 2 has the following context params: com.sun.faces.numberOfViewsInSession (default is 15) com.sun.faces.numberOfLogicalViews (default is 15) What is the difference between them? The documentation doesn't speak much about these. My app was having trouble with ViewExpiredException for some pages, but after we bumped these settings to a (much) higher value, we stopped having problems. My app is a financial, form-heavy, ajax-enabled app (some screens have 50+ inputs, with the option of adding alot more data/inputs via AJAX). what can be the cause for this behaviour? I

Configuration of com.sun.faces.config.ConfigureListener

会有一股神秘感。 提交于 2019-11-26 09:53:51
问题 I\'m reviewing a current JSF project where the web.xml configuration contains: the FacesServlet (configured on *.xhtml ) the com.sun.faces.config.ConfigureListener I\'m using JSF 2.2 and Mojarra implementation. I\'m confused about the ConfigureListener . Is this class needed in the configuration? What is the goal of this class? I couldn\'t find any information and the class has almost no javadoc. If I remove this configuration, everything seem to work the same way. Thus I guess that the