omnifaces

After validation error subsequent ajax requests get values from UI Components and not from Beans

五迷三道 提交于 2019-12-09 17:56:24
问题 In my JSF 2 based application I have a form that includes (amongst other UI components) some checkboxes. On the checkboxes I have registered ajax requests that fire when they are checked. The ajax requests will actually just update the value of another checkbox in the backing bean. As a result the other checkbox will also be checked (when it gets re-rendered - as it will take the updated value from the backing bean in the render response phase). This works fine until the whole form gets

Ajax Session Time Out FullAjaxExceptionHandlerFactory not working with shiro

◇◆丶佛笑我妖孽 提交于 2019-12-08 13:39:30
问题 Details of the code that i have added for using Ajax Session time out, as described by BaluC Faces-Config.xml <factory> <exception-handler-factory>org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory</exception-handler-factory> </factory> Web.xml <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/expired.xhtml</location> </error-page> application-config.xml <bean id="shiroFilter" class="org.apache.shiro.spring.web

Required fields with OmniFaces 1.6.1

左心房为你撑大大i 提交于 2019-12-08 08:37:06
问题 Primefaces 3.5.16, JBoss 7.2.0, PE 0.7.1, Mojara 2.1.26, WELD-000900 1.1.10 (Final) Web.xml has some configuration stuff, faces-config has languages bundles defined. I have following dialog with some input fields and p:tabview: <p:dialog> <h:form> <p:tabView binding="#{tabViewEL}"> <p:messages autoUpdate="true"/> <p:tab title="tab1"> <p:inputText value="#{bean.value1}" required="true" /> <p:inputText value="#{bean.value2}" /> <p:selectOneMenu value="#{bean.value3}"> <f:selectItems value="#

ignoreValidationFailed doesn´t work inside ui:repeat

时光怂恿深爱的人放手 提交于 2019-12-08 07:07:01
问题 I´m using o:ignoreValidationFailed, but it doesn´t work inside the ui:repeat. When I do the same outside, it works! I tried with mojarra ans MyFaces... I´m using primefaces. If there is another way to skip the validations only for one button... <o:form id="rateplanEditByPeriod" prependId="false"> <p><p:messages id="mensagensDlg"/></p> <p:tabView id="tabs"> <p:tab title="Cancelamento" id="tabCanc"> <h:panelGrid id="cancelationsTable" columns="2" cellpadding="10px" columnClasses="alignTop

JSF - Triggering methods on submit

拥有回忆 提交于 2019-12-08 03:12:12
问题 I am using composite, tag or custom components in my new JSF 2.1 powered application. I still often ignores the right (or at least recommended) way to proceed with this technology. I would like my components to perform some action when the user is clicking on the "save" button. Practically, the save button is a Primefaces commandButton. So, I am using button code such as: <p:commandButton id="example" type="submit" value="Confirmer les modifications" process="targetComponent" update="

Script is not rendered after postback in a composite component added programmatically

萝らか妹 提交于 2019-12-08 02:06:16
问题 I have this composite component: inputMask.xhtml <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://xmlns.jcp.org/jsf/composite" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> <composite:interface> <composite:attribute name="value" /> <composite:attribute name="mask" type="java.lang.String" required="true" /> <composite:attribute name="converterId" type="java.lang.String" default="br

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

Implementing a Locale provider that works in JSF and JAX-RS

蓝咒 提交于 2019-12-07 23:13:49
问题 I've been joyfully using omnifaces' Faces.getLocale() to aquire the locale used by the currently logged in user (which in turn gets this from a <f:view> definition). I really like the fallback approach from view to client to system default locale as it fits the requirements for locale selection in my application: If a user is logged in, use his language preference (obtained from the backend entity) If no user preference can be found, use the highest ranking language from the Accept-Languages

@org.omnifaces.cdi.ViewScoped invokes @PostConstruct on unload of an already destroyed view

你离开我真会死。 提交于 2019-12-07 11:33:25
I have a problem working with @org.omnifaces.cdi.ViewScoped and multiple tabs: I have a link in TestPage.xhtml that opens another page (ShowValuePage.xhtml) with a request parameter "someValue". If I open this link 10 times in a new tab and navigate away in the first opened tab, PostConstruct will be called again instead of just navigating away. Same happens if I navigate back from ShowValuePage to TestPage multiple times. (To test this, we must click the links "Show Value" and "Home" multiple times). This only happens if more tabs are opened than defined in the web.xml values

Get list all initialized @Named-beans on runtime

烂漫一生 提交于 2019-12-07 09:05:48
问题 I use javax.inject.Named and javax.enterprise.context.*Scoped plus org.omnifaces.cdi.ViewScoped to define the life-scope of my view-beans. Now I want to get a list of all instantiated beans. First, I thought this blog-entry covers this issue, but it only lists @ManagedBeans . Do you know how to list them? Is this possible without being fixed on an implementation or even a version of JavaEE? Kind regards, Rokko PS: I already found org.omnifaces.cdi.BeanStorage , but I don't have any idea how