jsf-2.2

How can I apply p:resetInput or p:ajax resetValue =“true” for p:dataList?

雨燕双飞 提交于 2019-12-08 10:11:59
问题 All we know the problems of validation failed in JSF (take a look in here). Primefaces seems to resolve the problem with p:resetInput or p:ajax resetValue ="true" . Now I face another problem when I tried to use this way for p:dataList . The validation now work's really crazy, the value that was submitted before is back after validation fail . So, can anyone give me a solution? Thanks a bunch. More info: I tried update panel, dataLists, even every component inside, but it still doesn't work.

update text box based on checkbox selection jquery

前提是你 提交于 2019-12-08 09:50:18
问题 I want to achieve following thing with Jquery There are multiple trips and each trip has checkbox and textbox. Whenever checkbox is checked then the value in textbox corresponding to that checkbox must be updated to "1" . Whenever customer types in textbox then checkbox shall be checked <input type="checkbox" id="ckval1" class="checkvaloare" />Trip 1 <a href="">sad</a><a href="">ssad</a> <input type="text" id="text1" class="ckval" size="2" /> <br/> <input type="checkbox" id="ckval2" class=

p:dashboard added panels aren't draggable

烈酒焚心 提交于 2019-12-08 09:45:54
问题 I have been trying to follow this showcase example. What I want to do is dynamically add components to a dashboard by clicking buttons on a p:splitButton , the adding of components to the dashboard works, but the panels aren't draggable for some reason. Why? The XHTML <!DOCTYPE html> <html xmlns="http://www.w3c.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"> <h:head> <title>Example</title> </h:head> <h:body> <h:form id="splitButtonForm"> <p

Dataexporter returns empty rows after filtering

人盡茶涼 提交于 2019-12-08 09:19:50
问题 I have a datatable in my xhtml view with filtering enabled. Additionally, there's the Primefaces export (for Excel) function in the context menu. When I use this function without filtering the datatable it works fine, but when I filter first and den export the data I get a file with empty rows. This is my code: <p:panel header="#{msg['prs.list']}"> <p:contextMenu for="persons"> <p:menuitem value="#{msg['com.view']}" icon="#{msg['icon.view']}" action="#{personBean.redirectToEditPerson}"/> <p

Problem with p:dashboard model dynamically update

一个人想着一个人 提交于 2019-12-08 07:33:51
问题 I'm trying to develop a particular Dashboard. I want to create an initial empty dashboard, and dynamically fill it with elements. First of all, I create an empty dashboard: XHTML ---> <p:dashboard id="dash" model ="#{homeReceptionDashboardBck.model}"> <c:forEach items="#{homeReceptionDashboardBck.widgets}" var="widgetsElement"> <p:panel id = "widgetsElement.idWidget" header="widgetsElement.name"> <c:forEach items="#{homeReceptionDashboardBck.uploadBooking(widgetsElement)" var="bookings"> <h

How do I include a body into a tagfile

一曲冷凌霜 提交于 2019-12-08 04:16:33
问题 I have a tagfile I intend to use as an input template: <ui:composition xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <div class="qr"> <label>#{question}</label> <div class="helpButton"></div> <!-- body here --> <!-- errors output eventually to go here --> </div> </ui:composition> It is stored in my /WEB-INF/tags folder with a .taglib.xml and necessary web.xml context-param.

JSF 2.2 and Spring 4 and CDI on different layers without losing Spring features

元气小坏坏 提交于 2019-12-08 03:30:50
问题 I’m a little confused after all articles that I read. I don’t want to use additional services as I’ll need if I use Weld Framework instead of simple Spring qualifier in service layer. And I have one service which uses JavaMailSender. I just want to have ability use AOP in controller layer with JSF. I got absolutely confused after reading about support JSR-229 and JSR-330 by Spring (even Spring 3) Spring 3 And JSR-330 @Inject And @Named Example Does it mean that I can do smth like that and don

Advantages of using JSF Faces Flow instead of the normal navigation system

余生颓废 提交于 2019-12-08 01:57:27
问题 I'm exploring the JSF 2.2 Faces Flow feature but I'm still not sure what are the advantages of defining a flow using Faces Flow instead of using the normal navigation system (calling facelets in links or buttons)? 回答1: Only use it if you want to use a @FlowScoped bean on a given set of views. In other words, only use it if you want a managed bean which should live as long as you're navigating through the specified collection of views registered in the flow configuration file. There are indeed

How does different phases of JSF lifecycle behave in a stateless view containing a form

不羁的心 提交于 2019-12-07 23:29:44
问题 If I have a stateless view in JSF containing a form. How does the different phases will behave when I filled out the form and submit it? since the state of the view is not stored anywhere, how does the phases "appy request values", "update model" etc. will work now? 回答1: All phases of the JSF lifecycle will continue to run. Only the restore view and render response phases will behave a bit differently. The restore view phase will now only build the view, but not restore its state. The render

JSF 2.2 CDATA is escaped

一世执手 提交于 2019-12-07 19:21:28
问题 I have found some weird behaviour after upgrading to Mojarra 2.2.3. The following Javascript declaration gets mangled: In the .xhtml file: <script type="text/javascript"> <!-- /* <![CDATA[ */ $(document).ready(function() { if ($('#some_identifier').size() > 0) ... /* ]]> */--> </script> This is mangled into the following nonsense: <script type="text/javascript"> <!-- /* <![CDATA[ */ $(document).ready(function() { if ($('#some_identifier').size() > 0) ... /* ]]> */--> </script> This breaks all