jsf-2

When to use NavigationHandler.handleNavigation vs ExternalContext.redirect/dispatch

It would seem that the following are equivalent: FacesContext.getCurrentInstance().getApplication().getNavigationHandler().handleNavigation("/index.xhtml?faces-redirect=true"); FacesContext.getCurrentInstance().getExternalContext().redirect("/testapp/faces/index.xhtml"); Are there any differences...

Primefaces how to update content in a dialog and keep the dialog centered?

I have a dialog that contains no content on page load and I'm dynamically setting the content of a dialog box based on the link that a user clicks on. <p:dialog widgetVar="dlg" modal="true" id="dialog"> <p:panel id="fullArticle"> <h:outputText value="#{content.newsArticle}" escape="false" /> </p...

Redirect handling PrimeFaces Ajax requests on session timeout in Spring Security

I am trying to get the JSF web front-end to redirect to back to the login page (in Spring Security) when the session times-out. I have tried using a meta-refresh approach, however this causes an undesired side-effect that the meta-refresh time will not be updated when only AJAX controls are used on...

Cross field validation in jsf h:datatable using p:calendar

I noticed this question was asked, but it has not been answered correctly. I have a datatable that has two columns start date and end date . Both contain primefaces p:calendar controls in them. I need to ensure that for each row that the date in column1 is not after the date in column2. I would like...

How to display a pop up notification to the user using jquery?

I am developing an application which requires that user must be notified about some background events i.e. invitation from other user, reminder time out etc. Whenever the event occurs the controller will be notified, and a small window should be displayed to the user. How should I proceed to achieve...