mojarra

Mojarra 2.2 versions diverging

余生颓废 提交于 2019-12-10 03:01:02
问题 https://javaserverfaces.java.net/nonav/2.2/releasenotes.html lists two diverging version branches of JSF2.2 where, strangely, 2.2.8-xx seems to be more recent than 2.2.9 and above. Some bugs are fixed only in 2.2.9 (https://github.com/javaserverfaces/mojarra/issues/3384), some only in 2.2.8-xx (https://github.com/javaserverfaces/mojarra/issues/4111) and some in both versions (https://github.com/javaserverfaces/mojarra/issues/3133). Whats the reason behind this and which branch should I use in

JSF SelectItems and escaping (xss)

邮差的信 提交于 2019-12-10 01:54:54
问题 there is a selectOneMenu in my example with a f:selectItems-attribute. The select-items are resolved from my bean like this: <h:selectOneMenu value="#{bean.value}"> <f:selectItems value="#{bean.selectItems}" var="obj" itemValue="#{obj}" itemLabel="#{obj.name}"/> </h:selectOneMenu> The method getSelectItems() in my bean looks like that: public List<MyObject> getSelectItems() { List<MyObject> list = new LinkedList<MyObject>(); MyObject obj = new MyObject("Peter"); list.add(obj); return list; }

f:convertNumber on Double: ClassCastException

与世无争的帅哥 提交于 2019-12-10 00:37:56
问题 In JSF 2.3, I have an h:inputText to edit a Double value, which has in addition Bean-Validation constraints. The h:inputText has a f:convertNumber . When submitting the form, this leads to a ClassCastException (see below). So, it seems, that f:convertNumber produces a Long which then, could not be converted to Double to validate the @DecimalMin constraint, right? In JSF 2.2 this worked as expected, the problem occured after upgrading to JSF 2.3. Does anybody has any ideas what could be the

faces-config.xml xsd error for version 2.1

半世苍凉 提交于 2019-12-08 16:31:44
问题 Eclipse keeps telling me there is a problem with http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd on my faces-config.xml, is anyone else having an issue with it? <?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd" version="2.1"> </faces-config> The error is: Referenced file

ui:repeat - adding / removing elements from list does not work properly

拈花ヽ惹草 提交于 2019-12-08 09:00:30
问题 I have following code in my .xhtml file <h:form id="registration3Form"> <h:panelGroup id="terms_outer_panel"> <h:commandLink styleClass="item-7" action="#{registerBusinessWizardController.addCourse}" value="#{msgBundle['registerThirdPage.panel.addSchedule']}"> </h:commandLink> <ui:repeat value="#{registerBusinessWizardController.courses}" var="course"> <h:panelGroup id="terms_inner_panel"> <div class="term"> <h:inputText id="price" styleClass="item-2" value="#{course.price}" /> <h:inputText

Duplicate ID error with updated Mojarra 2.1.27

*爱你&永不变心* 提交于 2019-12-08 07:40:48
问题 I will give some context first before describing the issue I'm experiencing. The environment is JSF, Primefaces 3.5 and GlassFish 3.1.2.2. I am working on an application used for editing data. The data is split between several forms, each form being in a tabView's tab. The data model is very rich, and in some cases there are several nested tabViews. To ease development, the application has one composite component describing a form field. It groups the field's label, input, tooltips and other

How to forward JSF RI (Mojarra) log to slf4j or log4j?

牧云@^-^@ 提交于 2019-12-08 07:27:17
问题 How to teach Mojarra to use slf4j or log4j? According to slf4j documentation I have to call: org.slf4j.bridge.SLF4JBridgeHandler.install(); Somewhere in my project. But I can't call it in Mojarra... So, the question is when and how shall I execute this install() method? 回答1: The best way to do it is through a custom Listener. Being initialized before JSF servlet it should configure jul-to-slf4j bridge in contextInitialized(ServletContextEvent). 回答2: I believe Mojarra, being Sun code, uses

Ajax view updates doesn't work properly in custom components with dedicated java class

旧时模样 提交于 2019-12-08 04:18:45
问题 I have a bigger problem than the one I'll describe here, but since it would be difficult to explain and debug my code, I created a smaller (and dumb) problem to reproduce the same error. In my view I want to print a list of strings, this list is calculated based in an offset. In my java class I have a huge static array of Strings. To calculate my list of strings (that will be printed in the page) I copy the values in my static array to my list, starting from the value of "offset". In my page

Mojarra 2.1.14 flash scope messages and redirect to different path

安稳与你 提交于 2019-12-08 01:22:44
问题 According to this: http://java.net/jira/browse/JAVASERVERFACES-2136 flash-"scoped" messages should survive a redirect to a page on a different path.. I wanted to use something like this in my application so i downloaded javax.faces-2.1.14-20121003.074348-10 snapshot from here https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.faces/2.1.14-SNAPSHOT/ to test. My situation is this: I have a page (call it test.xhtml) in the root directory that in the view-scoped backing

Mojarra Java EE 5/6 compatibility

末鹿安然 提交于 2019-12-07 20:12:46
问题 Very simple question: is there anyone who has a link to "official" information on the Mojarra (JSF RI) compatibility with the Java EE 5 and 6 standards? I can't seem to find anything about this. We're stuck with a Java EE 5 application server, and we'd like to know which version of Mojarra we can use. Currently, we're using 2.0.3 but this version suffers from a nasty nested ui:repeat bug. This has been solved in Mojarra 2.1.1, but there seems to be a lot of confusion about which Mojarra