¡@

Home 

java Programming Glossary: facescontext.getcurrentinstance

@Inject to pass params to a CDI @Named bean via URL gives Jboss error on Netbeans

http://stackoverflow.com/questions/10058852/inject-to-pass-params-to-a-cdi-named-bean-via-url-gives-jboss-error-on-netbean

bean creation @PostConstruct public void init String id FacesContext.getCurrentInstance .getExternalContext .getRequestParameterMap .get id ... Another..

Primefaces page layout with tree menu as navigation

http://stackoverflow.com/questions/10444584/primefaces-page-layout-with-tree-menu-as-navigation

.getApplication .getNavigationHandler .handleNavigation FacesContext.getCurrentInstance null start.xhtml faces redirect true catch Exception e logger.info..

JSF navigation redirect to previous page

http://stackoverflow.com/questions/1164964/jsf-navigation-redirect-to-previous-page

that it doesn't need to handle normal response by adding FacesContext.getCurrentInstance .responseComplete to the action method. Or even better just.. from under the JSF's hoods but instead do FacesContext.getCurrentInstance .getExternalContext .redirect url This will automatically invoke..

JSF Filter not redirecting After Initial Redirect [closed]

http://stackoverflow.com/questions/13366936/jsf-filter-not-redirecting-after-initial-redirect

true return success public String logOut FacesContext ctx FacesContext.getCurrentInstance ExternalContext extCtx ctx.getExternalContext Map String Object..

Prevent suffix from being added to resources when page loads

http://stackoverflow.com/questions/14963756/prevent-suffix-from-being-added-to-resources-when-page-loads

String getRequestPath ExternalContext externalContext FacesContext.getCurrentInstance .getExternalContext String mapping externalContext.getRequestServletPath..

JSF - get managed bean by name

http://stackoverflow.com/questions/2633112/jsf-get-managed-bean-by-name

Application#evaluateExpressionGet FacesContext context FacesContext.getCurrentInstance Bean bean Bean context.getApplication .evaluateExpressionGet.. static T T findBean String beanName FacesContext context FacesContext.getCurrentInstance return T context.getApplication .evaluateExpressionGet context..

Forcing a save as dialogue from any web browser from JSF application

http://stackoverflow.com/questions/2914025/forcing-a-save-as-dialogue-from-any-web-browser-from-jsf-application

void download throws IOException FacesContext facesContext FacesContext.getCurrentInstance ExternalContext externalContext facesContext.getExternalContext..

i18n with UTF-8 encoded properties files in JSF 2.0 appliaction

http://stackoverflow.com/questions/3645491/i18n-with-utf-8-encoded-properties-files-in-jsf-2-0-appliaction

public Text setParent ResourceBundle.getBundle BUNDLE_NAME FacesContext.getCurrentInstance .getViewRoot .getLocale UTF8_CONTROL @Override protected Object..

How to reference constants in EL?

http://stackoverflow.com/questions/3732608/how-to-reference-constants-in-el

public class Config @PostConstruct public void init FacesContext.getCurrentInstance .getApplication .addELContextListener new ELContextListener..

How to make a redirection in JSF

http://stackoverflow.com/questions/4032825/how-to-make-a-redirection-in-jsf

of both action and actionParam request parameter using FacesContext.getCurrentInstance .getExternalContext .getRequestParameterMap .get actiontParam.. void doForward ActionEvent evt FacesContext facesContext FacesContext.getCurrentInstance String redirect define the navigation rule that must be used.. void navigate PhaseEvent event FacesContext facesContext FacesContext.getCurrentInstance String outcome action Do your thing facesContext.getApplication..

JSF 2.0 set locale throughout session from browser and programmatically

http://stackoverflow.com/questions/5388426/jsf-2-0-set-locale-throughout-session-from-browser-and-programmatically

public class LocaleManager private Locale locale FacesContext.getCurrentInstance .getViewRoot .getLocale public Locale getLocale return locale.. setLanguage String language locale new Locale language FacesContext.getCurrentInstance .getViewRoot .setLocale locale To set the current locale of..

JSF 2.0 File upload

http://stackoverflow.com/questions/5418292/jsf-2-0-file-upload

Now you can save bytes in DB and also content type FacesContext.getCurrentInstance .addMessage null new FacesMessage String.format File ' s' of..

Is there any easy way to preprocess and redirect GET requests?

http://stackoverflow.com/questions/7294651/is-there-any-easy-way-to-preprocess-and-redirect-get-requests

void check if someCondition FacesContext facesContext FacesContext.getCurrentInstance NavigationHandler navigationHandler facesContext.getApplication..

Using JSF 2.0 / Facelets, is there a way to attach a global listener to all AJAX calls?

http://stackoverflow.com/questions/9305144/using-jsf-2-0-facelets-is-there-a-way-to-attach-a-global-listener-to-all-ajax

whether the current request is an ajax request or not. if FacesContext.getCurrentInstance .getPartialViewContext .isAjaxRequest It's an ajax request... into account. All you need to do is to write this FacesContext.getCurrentInstance .getExternalContext .redirect url If you're not inside JSF context..

Typing Chinese with PrimeFaces' <p:editor> component

http://stackoverflow.com/questions/9634230/typing-chinese-with-primefaces-peditor-component

boolean isAjaxRequest return getWrapped .isAjaxRequest FacesContext.getCurrentInstance .getExternalContext .getRequestParameterMap .containsKey javax.faces.partial.ajax..