Skip to content

Commit

Permalink
Adapting producer
Browse files Browse the repository at this point in the history
  • Loading branch information
cuioss committed Aug 9, 2023
1 parent 2997adb commit db7119b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.faces.application.Application;
import javax.faces.application.NavigationHandler;
import javax.inject.Inject;
import javax.faces.context.FacesContext;
import javax.inject.Named;

/**
Expand All @@ -15,9 +14,6 @@
@ApplicationScoped
public class NavigationHandlerProducer {

@Inject
private Application application;

/**
* @return the derived {@link NavigationHandler}
*/
Expand All @@ -26,6 +22,6 @@ public class NavigationHandlerProducer {
@ApplicationScoped
@Named
NavigationHandler getNavigationHandler() {
return application.getNavigationHandler();
return FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
}
}

0 comments on commit db7119b

Please sign in to comment.