Am I right in thinking that this may not be the best idea:
private static Application app = FacesContext.getCurrentInstance()
.getApplication();
... or any other call to ... |
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 ... |
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 ... |
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 ... |
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?
|
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 ... |
I am trying to use Exadel Fiji for rendering Pie graphs.
Can someone tell me what does the el #{facesContext.externalContext.requestContextPath} mean ?
|
|
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 ... |
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 ... |
I have an ear , Sample.ear and two war files and one jar file in that
It's like this
Sameple.ear
|--- UI1.war
...
|
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">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<f:view>
...
|
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 ... |
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"
layout="table"
rendered="true"
styleClass="message-container error-message" ...
|
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 ... |
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 ... |
|
|
|
|
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 ... |
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 ... |
|
|
|
|
|
|
|
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 ... |
|
|
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) { ... |
|
|
|
|
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. ... |
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 ... |
|
|