Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

redirect to next activity on pag load

Michael ShapiraDec 29 2013 — edited Jan 5 2014

Hi. I am on Jdev 11g R2 (11.1.2.3)

Hi. I have a page that contains BTF.

In BTF I have a page fragment and parent-action activity

Depend on some condition I want to redirect the page to another page when it is loaded

So I added in the page view "afterPhase" method

    public void afterPageLoaded(javax.faces.event.PhaseEvent phaseEvent) {
        System.out.println("Redirecting2");
        NavigationHandler  nvHndlr = FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
        nvHndlr.handleNavigation(FacesContext.getCurrentInstance(), null, "alreadyIn");

    }

"alreadyIn" is the control case name that leads to "parent-action". So I expect the page to be redirected when it is initially loaded to another page. But it never happens. I still see the initial page being loaded

This post has been answered by Michael Shapira on Jan 5 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2014
Added on Dec 29 2013
3 comments
244 views