FacesContext « API « JSF Q&A

32.Web Service
JSF Q&A » API » FacesContext 

1. JSF - calling FacesContext.getCurrentInstance() in a static context    stackoverflow.com

Am I right in thinking that this may not be the best idea:

private static Application app = FacesContext.getCurrentInstance()
... or any other call to ...

2. How to Generate an ELContext without an active FacesContext?    stackoverflow.com

I need to get access to EL functionality in a Servlet Filter, but... that means I am not within the FacesServlet lifecycle. Thus, I need to instantiate an ELContext. I do not ...

3. Accessing FacesContext from Web Service    stackoverflow.com

I'm developing a Web Service which will be called by clients which are written by me. In the web service I need to use application-wide objects which eases the load of ...

4. How to remove FacesMessages from the FacesContext?    stackoverflow.com

In my screen, I have a drop down(select box), on selection of any of the options in that drop down , i display one or more text boxes beside the select ...

5. how to use FacesContext in jsf?    stackoverflow.com

how to use FacesContext in JSF? please give me one whole example ? and some explantion when and at what condition we need to use this?

6. JSFUnit accessing FacesContext before JSFSession is created    stackoverflow.com

I want to access the JSFUnit FacesContext before I create the JSFSession object. The reason for this is I would like to set a managed bean value before any request/response processing ...

7. What does the el #{facesContext.externalContext.requestContextPath} mean?    stackoverflow.com

I am trying to use Exadel Fiji for rendering Pie graphs. Can someone tell me what does the el #{facesContext.externalContext.requestContextPath} mean ?

8. java threadlocal singleton - what is it?    stackoverflow.com

In layman speak, what does it mean when somebody says an object is a threadlocal singleton in Java? I was at a lecture about Java Server Faces, and everytime the FacesContext ...

9. Is it possble to send messages from one faces context to another in JSF?    stackoverflow.com

I know about the function FacesContext.addMessage(). However, what happens if I am currently in a diffent faces context, like being in a different window. Is there some way to get a reference ...

10. Is FacesContext limited to one web application?    stackoverflow.com

I have an ear , Sample.ear and two war files and one jar file in that It's like this

     |--- UI1.war

11. FacesContext not found    stackoverflow.com

my jsp page is: Home.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

12. Accessing FacesContext from a thread    stackoverflow.com

In my JSF app I need to display FacesMessage from another thread. Acording to docs it's not possible. But maybe there is some trick to do so? I can't see another ...

13. Getting the current global messages from FacesContext    stackoverflow.com

I have a problem. I need to know whether my page has global errors or not. This is because I have 2 different h:messages (error containers)

<h:messages id="errorMsgsContainer"
styleClass="message-container error-message" ...

14. Again - Cannot find FacesContext    coderanch.com

Strange problem - I'm using authorization filter to check for access rights of a user when resource is requested. If a user is logged in as admin, he is redirected to a page where the contents of his personal dir is displayed. It works ok, but when a regular user is logged in, the page which is supposed to show directory ...

15. Which Package to Import to Use FacesContext's getRequestMap()?    coderanch.com

Maybe I should post my code for people to understand what I am really trying to do. I have a dataTable. For each row in that table, there is a checkbox. My backing bean will select the row or rows for which the checkbox is/are marked by an user. The syntax error occurred at which I try to get the JavaBean ...

17. Cannot find FacesContext    coderanch.com

20. EL - Without FacesContext    coderanch.com

Hi, The Expression Language that is currently used in JSF requires the FacesContext ( associated with the faces request ) for evaluation. This is obvious because FacesContext is used to resolve the managed bean name that is used in the expressions. If I use AJAX ( which I am using ) then the HTML or HTML fragments that are returned from ...

21. What is the use of Facescontext Context Object    coderanch.com

Ideally, as little as possible. The Facescontext is the anchor point for connecting to framework-and container- specific services. For example, you can obtain the underlying httprequest and context objects for the page request that's accessing your backing bean by going through the Facescontext. That includes the security context a web page request is running under. The general philosophy behind JSF is ...

29. FacesContext rendering    coderanch.com

It depends on what phase of the application lifecycle the method in question is being called in. The commented out code simply sends control directly to the Render Response phase, skipping any of the other potential phases that may be between where the flow of control presently is and it's inevitable destination. Think: Restore View -> Apply Request Values -> Process ...

31. facesContext.maximumSeverity in JSF    coderanch.com

32. Can we Access FacesContext outside FacesServlet    coderanch.com

Yes we have to provide a link on pdf.. and that link is of a servlet and from that servlet it will navigate to application. I am able to get an instance of facescontext now by creating a new instance in servlet as below // Get current FacesContext. FacesContext facesContext = FacesContext.getCurrentInstance(); // Check current FacesContext. if (facesContext == null) { ...

36. Cannot find FacesContext    coderanch.com

37. solution to read a file from FacesContext    coderanch.com

Even under Windows it's a bad idea to use backslashes in filename paths in Java. Use forward slashes and you'll be OS-independent. More importantly, you won't make mistakes like the one you made, which was failure to escape the filename's backslash character. Since in Java, backslash is an escape character, you have to escape it: "reports\\templates". But "reports/templates" is much tidier. ...

38. java.lang.RuntimeException: Cannot find FacesContext    coderanch.com

Since there is a JSF class in the stack trace (that is trying to find the FaceContext) I think that the point Cesar made is not the issue. But you should still check that the libraries he mentioned are present of course! But you say that the error is shown right after the war is deployed. Are you sure? It looks ...

39. Cannot find FacesContext    coderanch.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.