myfaces

JSPX Trinidad messageDetailNotInRange for validateDateTimeRange not working

可紊 提交于 2019-11-29 15:44:05
I am trying to override the default validateDateTimeRange message using messageDetailNotInRange as per the documentation. Despite my code, the validator produces the default error message: "The date is outside the valid range." Can anyone see something wrong here? <tr:inputDate required="true" inlineStyle="color:rgb(0,58,117); font-weight:bold;" value="#{processScope.benefit.serviceDate}" immediate="false" onchange="submit();" label="#{mb_ResourceBean.res['claim.serviceDate.label']}"> <tr:convertDateTime pattern="yyyy/MM/dd" secondaryPattern="yyyyMMdd" type="date"/> <tr:validateDateTimeRange

Facelets multi-level templates - ui:define not rendered

牧云@^-^@ 提交于 2019-11-29 14:31:12
I have 2 basic templates - one with a side menu, and one without - that both ui:include a common page which contains ui:insert tags (templates are largish, so basic example below). Using Mojarra everything worked ok, but now I have migrated to MyFaces the ui:insert tags are ignored and the content of the related ui:define does not get rendered (i.e. 'Here are my results' is not displayed). Should I be specifying included-page.xhtml as a template somehow? I tried <ui:composition template="included-page.xhtml" /> instead of <ui:include src="included-page.xhtml" /> but lost the CSS. Hoping

@ManagedProperty injected AFTER @PostConstruct

浪尽此生 提交于 2019-11-28 12:54:19
问题 THIS PROBLEM IS ALREADY SOLVED IN THE MYFACES 2.1 IMPLEMENTATION I have a link which passes an Integer parameter properly like this: <h:link outcome="/process/createProcess"> <f:param name="id" value="#{process.idprocess}" /> Edit </h:link> It goes to "createProcess.xhtml?id=21" properly, and I have this code in the request scope backing Bean createProcess: @ManagedProperty(value="#{param.id}") private Integer idProcess; private Process newProcess; @PostConstruct public void init() { log();

IllegalArgumentException: duplicate key (JSF)

久未见 提交于 2019-11-28 10:48:44
问题 I'm using Tomcat 7, Richfaces 4.2.2, MyFaces 2.1.5 and Facelets. When I start Tomcat I get the error: An error occured while initializing MyFaces: duplicate key: class javax.faces.convert.BooleanConverter java.lang.IllegalArgumentException: duplicate key: class javax.faces.convert.BooleanConverter at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115) at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:72) at com.google.common.collect

JSPX Trinidad messageDetailNotInRange for validateDateTimeRange not working

余生颓废 提交于 2019-11-28 09:57:28
问题 I am trying to override the default validateDateTimeRange message using messageDetailNotInRange as per the documentation. Despite my code, the validator produces the default error message: "The date is outside the valid range." Can anyone see something wrong here? <tr:inputDate required="true" inlineStyle="color:rgb(0,58,117); font-weight:bold;" value="#{processScope.benefit.serviceDate}" immediate="false" onchange="submit();" label="#{mb_ResourceBean.res['claim.serviceDate.label']}"> <tr

java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener when using MyFaces with WASCE/Geronimo

时光毁灭记忆、已成空白 提交于 2019-11-27 20:35:00
I am trying to create a simple JSF web application using MyFaces v 2.1 with WebSphere Application Server Community Edition v3.0.0.1 and Eclipse Juno but when I try to run the application the following error is returned java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener org.apache.geronimo.common.DeploymentException: java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:665) at org.apache.geronimo.web25.deployment

What is viewstate in JSF, and how is it used?

橙三吉。 提交于 2019-11-27 19:22:11
In JSF, there is a viewstate associated with each page, which is passed back and forth with submits etc. I know that viewstate is calculated using the states of the various controls on the page, and that you can store it either client side or server side. The question is: how is this value used? Is it used to validate the values sent at submit, to ensure that the same request is not sent twice? Also, how is it calculated - I realise that richfaces may be calculated differently from myfaces, but an idea would be nice. Thanks. The question is: how is this value used? Is it used to validate the

Migrating JSF 1.1 with Ajax4jsf 1.x to JSF 2

末鹿安然 提交于 2019-11-27 14:51:09
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 request has been completed at org.apache.myfaces.application.ApplicationImpl.setViewHandler(ApplicationImpl

@EJB in @ViewScoped @ManagedBean causes java.io.NotSerializableException

元气小坏坏 提交于 2019-11-26 23:17:26
问题 I've read @EJB in @ViewScoped managed bean causes java.io.NotSerializableException, but my state saving setting is server . Here is what I have: web.xml : <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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-app_3_0.xsd"> <display-name

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