jsf-2.2

<a jsf:rendered=“#{…}”> is not interpreted as passthrough element

梦想与她 提交于 2019-12-19 09:05:49
问题 I don't understand why this piece of code is working: <h:link value="Login" rendered="#{sessionBean.userInSessionBean == null}" /> and this piece of code is not working: <a jsf:rendered="#{sessionBean.userInSessionBean == null}">Login</a> 回答1: A HTML element will only become a passthrough element if following conditions are met: There's at least one jsf:xxx attribute from http://xmlns.jcp.org/jsf namespace. There's at least one "identifying attribute" associated with a specific JSF component.

Handle ViewExpiredException in the background and restore form values

廉价感情. 提交于 2019-12-19 04:32:08
问题 Is there a database-, primefaces- and "keep-session-alive"-free solution to prevent or to handle a ViewExpiredException silently in the background while restoring the form-inputs? for example a user with a "stay logged-in cookie" would prefer not to be redirected to some kind of an error- or start-page; he fills out some form values, comes back in an hour and then, when he submits the form, the same view is re-created with its previous inputs and the submit-action of the underlying

PrimeFaces nested form inside p:dialog with appendTo="@(body)

萝らか妹 提交于 2019-12-19 02:39:38
问题 I have this fragment: <h:form id="form"> <!-- other content --> <p:panel id="panel" header="test"> <p:inputText id="input1" value="#{viewScope.prop1}" required="true" /> <p:commandButton id="button1" process="@form" update="@form @widgetVar(dialog)" oncomplete="PF('dialog').show()" value="ok" /> </p:panel> <!-- other content --> </h:form> <p:dialog id="dialog" header="dialog" widgetVar="dialog" modal="true"> <h:form id="form2"> <p:inputText id="input2" value="#{viewScope.prop1}" required=

JavaScript/jQuery event listeners do not work after JSF component is updated via Ajax

 ̄綄美尐妖づ 提交于 2019-12-18 13:17:33
问题 I'm executing the following jQuery function on <p:dataTable> filter (whose id is id ) that allows users to enter only digits in the filter component. $(document).ready(function() { $("#form\\:dataTable\\:id\\:filter").keydown(function(event) { //Allow: tab, escape, and enter if(event.keyCode===9||event.keyCode===27||event.keyCode===13|| //Allow: Ctrl+A, Ctrl+C (event.keyCode===65&&event.ctrlKey===true)||(event.keyCode===67&&event.ctrlKey===true)|| //Allow: home, end, left, right (event

Does Facelets rebuild the whole page if Ajax is trigger from a form and updates another?

我是研究僧i 提交于 2019-12-18 09:45:18
问题 Setup: I have 2 forms A & B I have a commandLink in form A: <h:commandLink actionListener="#{homeView.selectDiv('homeUpdates')}">#{msg.homeUpdates} <f:ajax render=":B" execute="@this" /> </h:commandLink> ...which updates form B. The problem is that when I click the ajax link, it rebuilds form A as well and gets an exception from a ui:repeat I have. Is this correct behaviour? Should it rebuild form A as well? I am using JSF 2.2 and form A contains a ui:fragment=>ui:include=>ui:repeat ====

Custom FaceletFactory in JSF 2.2 / Alternatives for virtual host facelets

。_饼干妹妹 提交于 2019-12-18 08:56:22
问题 Since Mojarra/JSF 2.2. it is not possible anymore to provide a custom FaceletFactory using a web.xml context parameter: <context-param> <param-name>com.sun.faces.faceletFactory</param-name> <param-value>my.faces.overrides.MyFaceletFactory</param-value> </context-param> My application provides some CMS features, including virtual host support to serve different pages (facelets) based on the currently requested domain. So http://www.domain1.com/index.xhtml returns different content than http:/

JSF Ajax render lose CSS with Jquery Mobile

你说的曾经没有我的故事 提交于 2019-12-18 08:54:39
问题 I'm using ajax to programming with Jquery Mobile, and it was good, ultil I try use ajax to render something :( I'm trying to do a h:selectOneMenu refresh the items when I select another h:selectOneMenu, and I put it inside a h:panelGroup to work. However, when the ajax is executed, and the panelGroup is updated, the selectOneMenu lose the JM css and become ugly. I'm using jsf 2.2 and Jquery Mobile 1.4 Beta Before: After: This is my page. I guess the bean doesn't metter, because the ajax is

Display footer in PrimeFaces template, when fullPage of p:layout is set to false

南楼画角 提交于 2019-12-18 05:15:21
问题 Footer is not displayed (actually, it is incorrectly displayed on top of the page), when fullPage is set to false in PrimeFaces template. <p:layout fullPage="false"> <p:layoutUnit position="north" size="135"> <!--Put north content here, if any--> </p:layoutUnit> <p:layoutUnit position="west" size="225" header="Menu Item" collapsible="true"> <!--Put west content here, if any--> </p:layoutUnit> <p:layoutUnit position="center" size="2500" maxSize="2500"> <!--Put center content here, if any--> <

How can I upload multiple files with JSF 2.2

不羁的心 提交于 2019-12-18 03:23:18
问题 I am trying to add a multiple file upload using h:inputFile . I had a quick look through the source code and it appears that it does not have the option to render multiple="multiple" . Is there a way around this without writing a custom component? If not, is there a suggested custom JSF2.2 component available that can handle multiple Ajax file uploads? Update: I have passed the multiple="multiple" using passthrough tag, but when I debugged the FileRenderer the relevant piece of code

JSF 2.2 faces-config: Unknown Schema version: 2.2

南楼画角 提交于 2019-12-18 03:08:37
问题 I'm trying to use the Faces 2.2. I get an error. SEVERE: Critical error during deployment: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/contracts/WEB-INF/faces-config.xml': Unknown Schema version: 2.2 at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:749) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:348) at com.sun.faces