jsf-2.2

CDI ViewScope & PrettyFaces: Multiple calls to @PostConstruct (JSF 2.2)

冷暖自知 提交于 2019-12-22 10:18:29
问题 I'v already check similar questions which declare that JSF 2.1 had this bug, but I'm using JSF 2.2 Let's detail: My environment: CDI: 1.1 Dynamic Web Module: 3.0 Java: 1.7 JSF: 2.2 PrettyFaces: 2.0.12.Final My Bean: @Named(value = "home") @javax.faces.view.ViewScoped public class HomeBean implements Serializable { @Inject private HomeController controller; private List<Store> myPopularStores; @PostConstruct public void postConstruct() { myPopularStores = controller.getStores(); LOG.log(Level

java.io.NotSerializableException: org.primefaces.component.datatable.DataTable after PrimeFaces is upgraded to 5.1

两盒软妹~` 提交于 2019-12-22 09:57:37
问题 Does someone get the following exception while redeploying/undeploying the application after upgrading PrimeFaces to 5.1 (community release)? INFO: Cannot serialize session attribute com.sun.faces.renderkit.ServerSideStateHelper.LogicalViewMap for session 14f27c51ac03df49279d2130b78f java.io.NotSerializableException: org.primefaces.component.datatable.DataTable at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180) at java.io.ObjectOutputStream.defaultWriteFields

How to override primefaces component api class with custom class

浪子不回头ぞ 提交于 2019-12-22 01:06:03
问题 I am facing the duplicate ids for columns issue in p:treeTable i.e. same problem as described in the below link http://forum.primefaces.org/viewtopic.php?f=3&t=31158&p=99463#p99463 So I would like to implement the solution as suggested in the above solution. So I thought of changing the source code and recompile and use the jar but I haven't got permission to do the same. I was asked to customise the class by extending the org.primefaces.component.api.UITree class or somehow without changing

Sharing components between views - how to improve my design?

扶醉桌前 提交于 2019-12-21 20:49:12
问题 I'm working on a JSF webapp which purpose is to wrap a command-line program. One of its main functionality is the ability to share a session between users (eg. for courses purpose), so that when an input is sent to an instance of the application, the output sent to every subscriber for this session. As a result of this design, the webapp is mainly composed of a view-scoped bean which will request a controller of the command-line application. It has also been chosen to identify a session with

NullPointerException in MyFaces facelet inclusion

回眸只為那壹抹淺笑 提交于 2019-12-20 04:27:10
问题 I'm trying to migrate simple JSF2.2 prototype from Mojarra 2.2.5 (... where works fine ...) to MyFaces 2.2.3 but a NullPointerException occurs. What I normally do using Mojarra is to include (inject) programmatically a JSF page within a container. The sample inclusion page ( inclusion.xhtml ) is: <h:panelGroup id="container"> </h:panelGroup> <h:form> <h:commandButton value="Include page" action="#{inclusion.include('included.xhtml')}" /> </h:form> The included page ( included.xhtml ) contains

@FacesComponent on shared library

早过忘川 提交于 2019-12-20 04:13:11
问题 I'm trying to use a custom jsf component on Websphere 8.5. The component class is annotated with @FacesComponent. The component is on a shared lib jar on the server. I already have an faces-config inside the jar META-INF folder. If the jar is inside my ear file it works as expected, but when its on a sharedlib it gives me "Undefined component type MyUIActionList" error. Any ideas on how to make this work? 回答1: Web fragment JARs belong in WAR/WEB-INF/lib and absolutely not in EAR/lib nor

Omnifaces exception on deployment on Tomcat 7

社会主义新天地 提交于 2019-12-20 02:52:35
问题 I'm trying to add Omnifaces 2.1 to a web application to use FullAjaxExceptionHandler and possibly other functionality in Omnifaces 2.1. I've read and followed following post by BallusC and am still stuck: How to install and use CDI on Tomcat? Tried to install Weld 2.2.9.Final and configure as described above. I am using the following: JSF 2.2, EL 2.2, Servlet 3, Java 7 web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http:/

UI Layout Initialization Error PrimeFaces 6.2

北战南征 提交于 2019-12-20 02:00:25
问题 The following code works fine with PrimeFaces 6.0 and 6.1 , but with 6.2 when I click on button Validate I see the dialog with the message: / UI Layout Initialization Error The center-pane element does not exist. The center-pane is a required element. I Use: JSF 2.2 , PrimeFaces 6.2 , Tomcat 8.5.23 Is there something wrong with the code or the problem is in PrimeFaces 6.2 ? Company.java import java.io.Serializable; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped;

Get full path of selected file in JSF

*爱你&永不变心* 提交于 2019-12-19 12:03:51
问题 I need a JSF button which allows user to browse and select a particular file, then I need my program to retrieve full path of the file. This functionality is required when user runs the client portion from the server itself (i.e. browses to the file in the same server which hosts the web app). If the user sends request from another machine, then uploading the file is enough. For now, I am using h:inputFile tag. <h:inputFile id="file" value="#{TrainingDirectoryBean.file}"></h:inputFile> My

There was a failure when processing annotations for application

久未见 提交于 2019-12-19 10:58:12
问题 I have an application that is using jsf2,hibernate4,spring4 and i am using the annotations in all the project ,the project was working fine on the Tomcat server ,but a new requirement appear that i have to use weblogic application server so i have installed weblogic 12.1.3 cause i have read it supports web module 3.0 ,but when to deploy to weblogic i got this error <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application C:\EclipseWorkspace\TESTAPP\target