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
1
vote
2 answers

Accessing FacesContext in Portal Application

We need to get certain information from PortletRequest in our Portal application. We do that using a utility method inside our Portlet Application. In this Utility method we access FacesContext.getCurrentInstance().getRequest() to get the…
Dileep
  • 11
  • 1
1
vote
0 answers

Getting list of all users that are currently connected

Possible Duplicate: JSF J_security_check How to get number of connected users and their role? I already know that this line takes care of getting the current logged-in user in a JSF 2 application: connectedUserName =…
lionheart
  • 177
  • 2
  • 13
1
vote
1 answer

How to use resolveWidgetVar before PrimeFaces 8?

https://github.com/primefaces-extensions/primefaces-extensions/blob/master/core/src/main/java/org/primefaces/extensions/renderer/CommandButtonSingleClickRenderer.java This appears to be an elegant solution to disable and enable PrimeFaces…
Steve
  • 31
  • 4
1
vote
0 answers

Java HttpServletRequest.getRequestURL() don't deliver the calling url

I have a problem to get the calling URL, For example, I call "www.xyz.de/abc", the urlrewite.xml change it to "www.xyz.de/test.jsp" to call the correct JSP. In the bean, I want to get the calling URL "www.xyz.de/abc" Here's my…
1
vote
1 answer

Not getting request parameters in @RequestScoped ManagedBean

I have one JSF page and have a Managedbean associated with it. My xhtml page looks like this:
Jince Martin
  • 211
  • 1
  • 3
  • 14
1
vote
2 answers

How to limit height of JSF component

I have the wrapped into my own faces component. Right now we found that when adding several messages the are of the expands moving the actual page components to the very far bottom of the page. It's not viable to change the 300 pages we have on…
ChRoNoN
  • 860
  • 8
  • 18
1
vote
0 answers

FacesContext.getCurrentInstance().getExternalContext().getContextName() returning null in WildFly 10.0.0

I'm trying to get the relative address of my view via the function FacesContext.getCurrentInstance().getExternalContext().getContextName() It works fine in Payara 4.1, however, the same code in Wildfly 10.0.0 returns null. Does anyone knows if…
1
vote
2 answers

How to get portlet init parameters in a JSF Portlet using FacesContext

I have got the following code to get a portlet init parameter "javax.portlet.faces.defaultViewId.view" from FacesContext. FacesContext fc = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); …
user872858
  • 770
  • 7
  • 15
1
vote
1 answer

FacesContext in a @WebListener

I need build some jsf urls in a @WebListener. I thought I could use a snippet of code like this one final FacesContext currentInstance = FacesContext.getCurrentInstance(); final String actionURL =…
1
vote
0 answers

What might be the reason for JSF/MyFaces to lose its FacesContext?

I have a webapplication based on JSF(2.1.17) myfaces /PrimeFaces + Omnifaces on WAS 8.0.0.9 Most of the time everything works ok, but occasionally I get the following exception: java.lang.NullPointerException at…
Jens Schauder
  • 77,657
  • 34
  • 181
  • 348
1
vote
2 answers

How to access the navigation-case of the faces config from a Java class

I have this situation, where I have to access the entire faces config from a managed beans. More specifically, I need to access the list of navigation cases, that were specified in the faces-config and cycle through them. Is there any way to get…
Arijit Datta
  • 101
  • 1
  • 2
  • 10
1
vote
2 answers

Trouble with ADF project call from external application

I have an ADF project using jdeveloper with name ADF1 and has a self authentication with the welcome page login.jspx and its backing bean backing_login.java. Now I need to use another application for authentication with name AUTH1. The user will…
GingerHead
  • 8,130
  • 15
  • 59
  • 93
1
vote
2 answers

How to make an instance of facescontext

I'm using springbatch to call a jasper report using JSF. The problem is when a call the method, the facescontext is always null, so I can get the session. For different issues that I had read, I realize that the problem is because the batch process…
user3490001
  • 31
  • 1
  • 4
1
vote
1 answer

FacesContext and what is ClientId

Can you explain me why we need in String clientId in the method void addMessage(String ClientId, FacesMessage msg);? Is it true that when client sent an initial request to server then server assign to this client a specific String ClientId. As i…
user2953119
1
vote
1 answer

Retrieve a Validator from FacesContext

I was wondering if it is possible to retrieve a Validator from the FacesContext as i can retrieve the ids from there. by doing this: Iterator ids = FacesContext.getCurrentInstance() .getApplication().getValidatorIds(); I…
Rittel
  • 579
  • 5
  • 21