Programmatically navigate to page

Hello,
I am trying to navigate to a page whenever any exception occurred. I have the following managed bean:
public class EstimationController extends BaseWebController {
    private EstimateService estimateService;
    private EstimateHomeDataBean estimateHome;
    public EstimationController() {
        super();       
        init();
    private void init() {       
        try {
            estimateService = getEstimateService();
            estimateHome = getEstimateHome();    
        } catch(Throwable thrown){
            Log.error(this, thrown.getMessage(), thrown);
            manageError();
}For this I have defined the control-flow-rule in adfc-config.xml as:
<control-flow-rule id="__10">
    <from-activity-id id="__9">*</from-activity-id>
    <control-flow-case id="__12">
      <from-outcome id="__13">gotoPartError</from-outcome>
      <to-activity-id id="__11">partError</to-activity-id>
    </control-flow-case>
</control-flow-rule>the manageError() method has been defined in BaseWebController withing which I have tried many of the following codes, nothing is working:
getFacesContext().responseComplete();
getFacesContext().getApplication().getNavigationHandler().handleNavigation(getFacesContext(), null, "gotoPartError");
getFacesContext().renderResponse();
getServletResponse().sendRedirect("/partError.jspx"); 
getFacesContext().getExternalContext().redirect(getServletRequest().getContextPath() + "/pages/partError.jspx");
RequestDispatcher dispatcher = getServletRequest().getRequestDispatcher("partError.jspx");           
dispatcher.forward(getServletRequest(), getServletResponse());
FacesContext context = FacesContext.getCurrentInstance();           
UIViewRoot newPage = context.getApplication().getViewHandler().createView(context, "/partError.jspx");
context.setViewRoot(newPage);
context.renderResponse();
ControllerContext.getInstance().getCurrentViewPort().setViewId("partError");My requirement is to navigate programmatically to the error page whenever any exception is occurred in the managed bean, and so I cannot define error pages in web.xml. My application can generate two types of exception and so depending on the exception type I need to navigate any of the two error pages I have.
Any suggestion would be very helpful.
Thanks in advance.

try java script...
public void navigateToErrorPage(){
ExtendedRenderKitService service =
Service.getRenderKitService(FacesContext.getCurrentInstance(),
ExtendedRenderKitService.class);
String page = "window.open('/partEerror.jspx','_self')";
StringBuffer navigatePage = new StringBuffer();
navigatePage.append("var hints = new Object();");
service.addScript(FacesContext.getCurrentInstance(),
page);
call this in your manageError() method...

Similar Messages

  • When clicking on links that open in a new window, the links don't open and Firefox freezes in a way. I can navigate the page I am on but cannot click to open a new tab or bookmark.

    When navigating the internet, if I come across a web page that has a link to open a picture or program in a new window, if I click on it, it does not open. Firefox immediately looses functionality in that I cannot open a new tab with the mouse wheel, right click to open a new tab, or use my bookmarks in either the drop down or toolbar to navigate away. I can usually still navigate the page that I am on, for example, (https://loanconsolidation.ed.gov/AppEntry/apply-online/appindex.jsp), when it freezes I cannot click on any of the content at the center of the page but I can still use the links from the list on the far left. For an example of the pictures, (http://www.insect-sale.com/), if you click on "New Arrivals" at the top of the page it takes you to a list of products that can only be viewed by clicking on them. Usually a picture of the item would open in a small window but it does not and Firefox freezes. This has also happen when I try a view a degree audit on a school's website where a program would usually open in a new window. The only thing I have been able to find that still functions properly when this happens is the home page button. I can click on it or use the wheel to open it in a tab just fine, but if I try and go anywhere else I cannot. The only way I can get Firefox back to normal is to use the Task Manager and end the process. Another thing I have noticed, that may or may not be related; is that my Norton Internet Security toolbar, that should show up below the bookmarks toolbar and above the tabs, only shows up about 1 out of every 10 times I open Firefox. Some days it doesn't show up at all. If it does show up and I log into Identity Safe, the autofill for the programed website works, even if the toolbar doesn't show up the next time I open Firefox.

    Go to Tools->Options->Apps
    Here you should see two columns: Content Type on the left, Actions on the right.
    Find and select excel spreadsheet or any other content type in the left column. There should be a corresponding action in the right column. What is it? You can use the drop-down list to select the option you want:
    Always Ask - Firefox will ask each time: What do you want to do with this file?
    Save file - Firefox will save this file to your computer
    Use - Firefox will give this file to the program to open it
    In case of saving, Firefox will either prompt you every time where you want the file to be saved, or save it to the default location. It depends on the preference in
    Tools->Options->General->Download

  • Teamviewer changing lists as navigate through pages-probl for anyone else?

    Hi All,
    We're using R/3 4.7, ESS 50.4 and MSS 6.1.20.  After much correspondence with SAP we have discovered that the teamviewer does not behave the way we thought/want it to.
    Basically as the teamviewer is applied on a page basis, each page gets their own teamviewer.  In our teamviewer we have 3 distinct lists of employees.  So if on one page you were looking at list 2 and you navigate to a different page, we expected to be on the same list.  Unfortunately, if the teamviewer on the new page was previsouly looking at a different list, say list 3, the employees for list 3 would be displayed.
    This is not what we want.  In essence we want the teamviewer to work off the MY Staff workset, so that when you navigate between pages, the teamviewer will remain on the same employee in the same list.  This to me is the most user friendly way and the way that makes the most sense. 
    If a manager wanted to view data for a single employee from a number of pages, (s)he could quite possibly have to reset the teamviewer on each page and select the employee again.  This is totally unacceptable..
    Has anyone else been bothered by this?  Did anyone come up with a solution?  I can't believe that this issue has not arisen before.  I would be interested to hear similar stories.
    Many Thanks,
    Liz.

    After much correspondence with sap, this is infact the expected behaviour on the team viewer

  • My Safari browser is not working well. Junk pages keep poping in and key pages for me appear intoxicated by alien pop ups preventing me navigate that page. Updated last Safari version and problem prevailed. Tried downloading Safari for Mac OS X Mavericks.

    My Safari browser is not working well. Junk pages keep popping up and key pages, for me, appear intoxicated by alien pop ups preventing me navigate that page.
    I updated to latest Safari version (7.0.4) but the problem persists.
    I tried downloading a new version of Safari for Mac OS X Mavericks but couldn't find it available.
    Thanks for your help.

    The pop ups are malware. It's not necessary to reinstall Safari.
    Help here ..
    The Safe Mac » Adware Removal Guide
    The Safe Mac » Genieo
    The Safe Mac » Mac Malware Guide
    Just so you are aware, on a Mac running Mavericks, the only way to reinstal Safari to to restore OS X using OS X Recovery

  • How do we programmatically "enable" the Page to have

    Some body known how do we programmatically "enable" the Page to have
    Item level security. - analogous to checking the box in the Page edit mode for "Enable item level security"
    J.

    Try this. It might work for you.
    declare
         l_page portal.wwsbr_api.page_record;
    begin
         select * into l_page
         from portal.wwv_user_owned_corners
         where siteid = <page group id>
         and id =<page id>;
         -- 0 is disabled . 1 is enabled.
         l_page.haveitemsecurity := 1;
         portal.wwsbr_api.modify_folder(
                   p_page => l_page
         wwpro_api_invalidation.execute_cache_invalidation;
         commit;
    end;
    regards
    Suresh.

  • How programmatically "enable" the Page to have Item level security

    Some body known how do we programmatically "enable" the Page to have
    Item level security. - analogous to checking the box in the Page edit mode for "Enable item level security"

    Hi, I only know portal.wwsbr_api.enable_ils_for_item.....
    You can perform actions on multiple objects simultaneously.
    Navigator > Page Groups(TAB) > PageGroup > Page > actions(link)
    Click on actions link and in LOV, select "Enable ILS".
    Hope this help.

  • I want to know  how to call navigate to page in new window.

    Hi,
    I want to know  how to call navigate to page in new window.
    Following is the code which i am using on Event OnInputProcessing.
    navigation->goto_page( 'index.htm' ).
    From the above code i am able to open the index.htm in the same window.
    but I need the index.htm in the new window.
    Please suggest
    Thanks in advance,
    Nilesh Labde

    Thanks ,
    I was able to find the navigatiion tab, But after entering the The Form name in that TAB, Still the New Page opens in ths SAME window.
    Following is the Code written on the Eevent--> OnInputProcessing
    navigation->next_page( 'NEXT' ).
    In the Navigation TAB
    Start                             Navigation Request                Target
    Sales_Person.htm                   NEXT                            index.htm
    Please suggest.
    Thanks in advance,
    Nilesh Labde

  • Programmatically creating a page with portlets in it

    Hello!
    I need a little help figuring out how to programmatically create a page and add a couple portlets to it. I have figured out how to create the PageDefinition and that code works great. How can I add 2 portlets (the portlet definitions already exist in the Portal Library) to that page definition?
    I just need a couple hints & maybe some pseudo-code to get me going in the right direction.
    I'm stuck with using BEA 8.1 SP2 at the moment.
    Thanks for any help,
    John

    If you want to add the portlets to the page in the library and effect all instances of the page use the PageDefinitionManager.addPlaceable(...) EJB.
    javadoc
    http://edocs.beasys.com/wlp/docs81/javadoc/com/bea/netuix/application/manager/IPageDefinitionManager.html#addPlaceable(com.bea.netuix.application.manager.CustomizationContext,%20com.bea.netuix.application.identifier.PageDefinitionId,%20com.bea.netuix.application.identifier.PlaceableDefinitionId,%20com.bea.netuix.application.identifier.PlaceholderDefinitionId,%20int)
    If you want to just effect that page on a particulr desktop use the PortalCustomizationManager.addPlaceable(...) EJB
    http://edocs.beasys.com/wlp/docs81/javadoc/com/bea/netuix/application/manager/IPageInstanceManager.html#addPlaceable(com.bea.netuix.application.manager.CustomizationContext,%20com.bea.netuix.application.identifier.DesktopDefinitionId,%20com.bea.netuix.application.identifier.PageInstanceId,%20com.bea.netuix.application.identifier.PlaceableDefinitionId,%20com.bea.netuix.application.identifier.PlaceholderDefinitionId,%20int)
    Chris Jolley
    Portal Architect

  • Where is navigate to page within skip logic?

    When I click on skip logic, I don't get an option to click on navigate to page.

    The following post provides an introduction to the "navigate to page" feature.
    http://forums.adobe.com/message/3763831
    Regards,
    Brian

  • Is it possible to navigate to Page stored on other database?

    Is it possible to navigate to Page stored on other database? Is there anyway which can attain a functionality nearest to this behaviour?

    Sumit,
    I don't think there is a way to make this work in a fashionable and maintainable way.
    I assume here that you mean with "Page stored on different database" to reference a page for which the Metadata is stored in a MDS repository on an 2nd database.
    The main problem here would be to make the connection to this database. As you may know the dbc file having the DB connection data is picked up when the JVM is started and is then used for all JDBC connections created in the JVM. As far as I know there is no option to have JDBC connections to >1 database in a JVM or switch the dbc file on runtime to make connections to the other database.
    So there is not an easy way to make an 'side-step' in the flow of pages to a page on another database. All meta-data for the pages should be in the MDS repository on the database to which JVM is connected.

  • Impossible to navigate through pages

    Hello,
    With App Store (and the same with iTunes), I am not able anymore to navigate through pages (2, 3, 4, 5 - next) once browsing te applications into their categories.
    Sorry for my bad English.
    Thanks and regards
    Henri

    Well, folks, I've got good news and bad news. I can now navigate through all the pages from 1 to N and back again. However, if I happen to choose to see the specific information for an app, say on page 6 of 10, it also works fine, but when I want to return to page 6, hitting the back arrow in the top left of the app page returns me to page 1 NOT page 6. So, I have to navigate to the bottom of page 1 and choose the page I wanted to return to in the first place, page 6. Still a bug, APPLE.

  • I cannot navigate my page bar up only down therefore I cannot go back up to the top of the page.

    The page bar only goes down and will not go up.

    You may have switched on caret browsing.
    * http://kb.mozillazine.org/accessibility.browsewithcaret
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    * Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"
    * http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    * http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • View Link and and navigate between pages problem...

    Hi, everyone! Hope someone can help with my problem. In DB I have one table with informationa about Employees and Jobs. From this one table I made one EO from which I made 2 VO - EmployeeVO and JobsVO. I link these two VO with ViewLink - EmpJobVL (1 to 1 realtionship).
    Then I created 2 .jspx pages. In one page I droped EmployeeVO but in second page I droped JobsVO. In page template I put button with which I can navigate between these two pages.
    The problem is... when I run my employee page and navigate to correct record with "next" button and then try to navigate to jobs page then in jobs page I can't see correct record. I always see there first record. Why it is so and what can I do?
    Hope that someone helps me,
    Best regards, Debuger!

    Hi Debuger,
         No probs, U can keep ur Jspx as such u just need to clean up ur PageDefs..... Dont struggle more urself its such a easy job...
         Delete all ur page def entries and then have a copy of ur jspx coding in a notepad and delete that too....
    make ur jspx and page def a fresh one re-drag ur VOs and paste ur jspx codings again
    Ur VOs will get binded automatically......... :)
    Regards,
    Suganth.G

  • How to programmatically manipulate web pages, page elements, and dialogs?

    Hi, I am trying to write a simple program that will:
    1. Access a downloadable resource on a web page
    2. Respond to a dialog box by:
    a. Filling in a filename to save the resource to
    b. Selecting the "Next" (or "Save" or "Finish" or whatever it's called) button to save the file
    3. Return to 1 to get another resource
    As it turns out, I can form the URL that immediately accesses the resource, so I don't have to surf through web pages. I can just immediately enter the URL I want. So therefore, I have two questions:
    1. Given a URL, how do I programmatically (from a Windows Vista environment and a regular DSL connection) access a web page?
    2. Once I've accessed the URL and a dialog pops up, how do I programmatically enter a filename and hit "Save"?
    Obviously, I'm no ace programmer. I have spent a couple of hours trying to figure out how to do this and looking for answers, but Googling "java http" doesn't give me a narrow set of responses :) so I thought I'd ask here. I welcome someone taking me by the hand and showing me exactly how to do this, but if you can just point me to some resources that don't require twelve hours of research to find what I want, that would be great, too.

    When accessing a file online, there will not always be a dialog box. This box is created by your web browser in response to a URL that points directly to a file, that the browser can't display. So my point is you can skip this step, and decide what you want to do in your program's code rather than being asked in a dialog box.
    For accessing files online, check out URLConnection .

  • Problem with back button when using task flow to navigate through pages

    I am using unbounded task flow to navigate through my pages
    in page2 I added back button so I can back to page1 using the action A2
    task flow 1
    page 1 -----A1-------> page 2
    page2 ----A2--------> page1
    the problem when I used page2 in another task flow
    task flow 2
    page 3 -----A3------> page2
    page 2 -----A4 -----> page3
    here when I click on back button he take me to page1
    how can I back to page3 ???????

    For this you have to know where the user came from when he navigated to page2. You can e.g. store the back target in a variable in the session or pageflow scope (when the user navigates from page1 or page3 to page2), then you bind the back button of page 2 to the stored variable.
    Timo

Maybe you are looking for