Questions tagged [facescontext]

This tag denotes the FacesContext class which is part of the Java Server Faces (JSF) model view presenter framework. It is used to permit disambiguation with the deprecated generic [context] tag.

This tag denotes the FacesContext class which is part of the Java Server Faces (JSF) model view presenter framework. It is used to permit disambiguation with the deprecated generic tag.

See Also

See the main information on .

112 questions
0
votes
0 answers

Trying to retrieve the user from session with FacesContext

I'm currently trying to retrieve all the data from the user that is logged in so I can use it for example listing his emails or his contacts, or to can modify or add new ones. At the beginning, in the login screen, I use a method to put that user in…
0
votes
1 answer

Adding message to faceContext is not working in Java EE7 run on glassFish?

I am doing the tutorial on Java EE7 that comes with glassFish installation. It is also available here. The code is present in glassFish server installation…
brain storm
  • 30,124
  • 69
  • 225
  • 393
0
votes
1 answer

How to test this sortingBean using FacesContext

I wrote myself aSortingBeanwhich is similiar to theCarsSortingBeanover here. I want to write a unit test for this class but I don't know how to do this. I got problems with the first line of the sort method. How can I successfully mock this? I…
Chris311
  • 3,794
  • 9
  • 46
  • 80
0
votes
1 answer

Get Application Module during invocation of Bounded Taskflow

I have a filter which maps just before the Faces Servlet and populate some Attributes in the HttpSession before it proceeds with the request if (_clientUser != null && !_clientUser.isEmpty()) { session.setAttribute(CLIENT_USER_URI_PARAM_NAME,…
mSchnell
  • 15
  • 6
0
votes
1 answer

Reading a parameter from web.xml in another package to init a view

To get a init parameter from same package, I can make it: in web.xml PARAM 1 and my java…
Helio Bentzen
  • 645
  • 2
  • 12
  • 24
0
votes
2 answers

Faces in ADF can't get the request parameters

I have an ADF web application with Faces 1.2 In my managed bean I am trying to access the parameters of the post request, but always getting null. This is my post form that I am posting to the Faces:
GingerHead
  • 8,130
  • 15
  • 59
  • 93
0
votes
1 answer

FacesContext resolves to null in ApplicationScoped bean

I have a filter: UserSessionFilter.java, that I use to handle user sessions and a ApplicationScoped bean: Config.java that primarily gives me access to a DAO factory. Config.java @ManagedBean (eager = true) @ApplicationScoped public class Config…
nivis
  • 913
  • 3
  • 17
  • 34
0
votes
0 answers

Serializable class containing HttpServletRequest exception

In my j2ee (myfaces + spring) application I have a session managed bean called UserSessionBean where I stored the data about the logged user. That class is marked as Serializable In a method I have to retrieve an HttpRequest parameter and i'm using…
user2010955
  • 3,871
  • 7
  • 34
  • 53
0
votes
1 answer

Handle ViewExpiredException before handle() method in ExceptionHandlerWrapper is called

I've already searched via google and on stackoverflow, but could not find any similar problem to mine. In my project I'm handling a ViewExpiredException properly and show a custom page to the user that the current session has timed out. This works…
0
votes
1 answer

facesContext is not defined Error while using facesContext.validationFailed

I'm trying to use #{facesContext.validationFailed} to know whether the validation is failed or not, and to or not to showup the dialog. I build a tiny project to test it but get ReferenceError: facesContext is not defined in my firebug, and the…
nosnhoj
  • 793
  • 1
  • 12
  • 30
0
votes
1 answer

Internet Explorer doesn't make file download, only characters appear

Internet Explorer doesn't make file download, only characters appear. Just Microsoft Office files for example (.doc,.xls,.docx) This is my code: *.jspx :
0
votes
2 answers

Accessing SessionScoped Beans in JSF pages

I am using SessionScoped Managed Beans in my application: @ManagedBean @SessionScoped public class SampleBean{ private String value; //getters and setters } I have my controller: @ManagedBean @SessionScoped public class…
Jini Samuel
  • 124
  • 1
  • 3
  • 13
0
votes
2 answers

JSF - Null values from parameters - FacesContext

I'm trying to get na few parameters (now it's two, but on the other xhtml probably I'll need more). On page index.html I have a link, to page Threads.xhtml, with parameters user_id and section_id:
Namek
  • 477
  • 1
  • 8
  • 20
0
votes
1 answer

how to save a base64 as image in java server faces project

I am doing a project for school. Subject of project is tshirt design. I am using jsf and primefaces. But I don't know well jsf and primefaces. I wanted save a base64 from html as image in jsf project. But when I had tried to following functions,…