Navigation and Creating  a navigation rule at runtime

Hi all,
How can I create a navigation rule at runtime?
I got all my pages (names and locations) stored in a database table.All my pages are jspx format.
I don't want to create navigation rules for each page, Instead I want to use the location stored in the database and create a navigation rule to navigate to.
I tried navigating using ServletRequest :
        ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
        HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
        HttpServletRequest  request = (HttpServletRequest)ectx.getRequest();
        request.getRequestDispatcher("/faces/Titles.jspx").forward(request,response);But it blows after the first call.
is it possible to create a navigation rule in a Bean or is there another way to call jspx pages from a Bean without loosing the session.
Can someone help me please.
thanks in advance,
Ahmad Esbita

Ahmad,
I don't know of any way to programatically create navigation cases at runtime. However, perhaps you could try creating a NavigationHandler decorator. Let's assume you have a function called "getViewIDforAction" that does the database lookup and returns the view ID for a given action code. You could do something like this:
package my.code;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
public class MyNavigationManager extends NavigationHandler
   NavigationHandler _base;
   public NavigationManager (NavigationHandler base)
      super();
      _base = base;
   public void handleNavigation(FacesContext fc, String actionMethod, String actionName)
      String viewID = getViewIDforAction(actionName);
      if (viewID != null && ! "".equals(viewID))
         fc.getViewRoot().setViewId(viewID);
      else
         _base.handleNavigation(fc, actionMethod, actionName);
}You'll also need this in faces-config.xml:
<application>
  <navigation-handler>my.code.MyNavigationManager</navigation-handler>
...any other stuff...
</application>Note: I haven't tested this or anything - just to give you an idea...
Regards,
john

Similar Messages

  • Missing "View|Application Navigator" and "View|Connection Navigator"

    My default Oracle JDeveloper 10g Early Access 10.1.3.34.12 is missing "View|Application Navigator" and "View|Connection Navigator" from the View toolbar. Am I simply missing an additional installation or do I not have something configured correctly?
    Thanks,
    Scott

    Thanks for the answer, that's exactly what it is. I'm new to this environment and had it installed for me, hence I didn't see the differences at the download choosing time. Thanks again.

  • HT5429 Are there any differences between iPhone 5's navigator, and iPhone 4s navigator?

    I just need to know if there is a difference between there navigators ..

    As I said in the first reply, there is a difference if the iPhone 4S still has iOS 5x on it. Once you have updated to iOS 6 on the 4S, it will be exactly the same as the iPhone 5. If the 4S has not been updated, it still has the Google Map application on it, and while you can get directions on it, it will not have turn by turn navigation, or spoken navigation.

  • Is it possible to Create dynamic outbound plug and it's navigation link?

    Hi,
    i am trying to create an outbound plug in runtime dynamically, is it possible?
    I have found out how to create the outbound plug in wdDoModifyView: "<b>view.getViewInfo().createOutboundPlug()</b>"
    but the problem is how do i set the plug name, and how do i create it's navigation link to bind him to an inbound plug in another view.
    Thanks,
    Carmit

    Hi Carmit,
    the following code snippet creates a link between a newly created outbound plug (outbound plug name is not really necessary) and an already existing inbound plug:
    /* targetViewInfo is the IWDAbstractViewInfo of navigation target
       srcViewInfo is the IWDAbstractViewInfo of navigation source
       Find inbound plug, must exist */
    IWDInboundPlugInfo targetPlug = targetViewInfo.findInInboundPlugs(inboundPlugName);
    /* Create outbound plug with "automatic" name */
    IWDOutboundPlugInfo srcPlug = srcViewInfo.createOutboundPlug();
    /* Create link from out to in */
    IWDNavigationTargetReferenceInfo targetReferenceInfo =
      srcViewUsage.createNavigationTarget(srcPlug.getName(), targetViewUsage, targetPlug.getName());
    /* Fire srcPlug somewhere...*/
    Hope that helps.
    Regards
    Stefan

  • I created a navigation page and published as portlet now how to add this pg

    I created a navigation page and published as portlet now how to add this page... i dont see in the portlet staging area.... i left the check mark publish as portlet on when i created the page...
    how do i add this to the page...

    The Navigation Page Portlet should be available in the Portlet Repository - select Published Portal Content -> Your Page Group Name
    Lisa

  • I want to implement three level Horizental navigation on the top navigation and menu items are created based on the data available in a SharePoint List.

    Hi All,
    I want to implement three level Horizental navigation on the top navigation and menu items are created based on the data available in a SharePoint List.
    Implement this requirement through customization, how can i start any help
    Thanks

    Hello,
    You can follow these links to get the result that you want. You can get the desired result either using the custom list or a site map. Please make sure when you edit the master page, dont work on the original v4.master. Always make a a copy and then work
    on it.
    This link will show you how get that navigation using a list.
    http://www.bitsofsharepoint.com/BlogPoint/Lists/Posts/Post.aspx?ID=60
    This link will show you how get that navigation using a sitemap.
    http://www.sharepointdiary.com/2012/01/custom-top-navigation-using-sitemap.html
    Please mark as "Answered" if this helped you.
    Thanks,
    norasampang

  • Please advise: create chapters and create navigation menu

    Hi,
    relatively new to FCP I'm trying to create three chapters in a 1.5 hr. movie. Can someone tell me how to create 3 separate chapters, each preceded by it's owner chapter page.
    I want to create a navigation menu from these chapters, that will be included on the DVD so that viewers can navigate immediately to either of these chapters.
    I find the FCP manual rather confusing. Any help will be greatly appreciated !!!!
    THNX
    Wim
    [email protected]

    In FCP, you create chapter markers by first making sure that none of the clips are selected, then place the Timeline playhead where you want the chapter marker to be located, then hit the m key twice. A marker dialog window will open; give the chapter a name if you like (optional), then click the Chapter button in the dialog window.
    Once you're finished with that (all editing should be completed before chapter markers are added), go to File-Export->QuickTime Movie. Include DVD Studio Pro markers in the drop-down menu.
    Once in DVD Studio Pro, create the menu(s) you want to use, or import them if you created the menus in another application like Motion or Photoshop. Link to menu buttons to the chapters.
    You should be able to find any number of tutorials online regarding this subject, as well as plenty of information in the DVD-SP user's manual/help files.
    -DH

  • Hide detailed navigation and Portal favorites windows for some roles?

    Hi ,
    We want to hide Detailed Navigation Area and Portal favorites area for some specific  roles.
    Thanks & Regards,
    Subba Rao

    Hi,
    1. You have to create a seperate desktop.
    2.  Inside the desktop, the framework which you are assigning will contain Desktop innerpage, Masthead and Top level navigation page.
    3. You need to copy the desktop inner page and paste with different name (since it is a standard page)
    4. Now open the custom desktop inner page and remove the iviews what ever you dont want.
    5. So now your framework page will not have the detailed navigation anymore.
    6. Then we need to set master rule collection to load this desktop for a specific role using if... then  condition.
    Finally the role will have only which ever the iviews you have selected in desktop inner page.
    Thanks,
    Mahendran B.

  • Hiding Navigator and Builder Links on Account Info Page

    Can any one help me to Hide the navigator and builder links in the Account Info page ?
    I need a very basic account info page where the user can only change his password. I am hoping that oracle has an easy method for doing this. I would not like to build a customized page if possible.
    Thanks

    As for any portal page, you just have to set the right acces rules on the navigator and builder pages and the links won't appear.
    Also, if you just need a link to change password you can create it in an html portlet, just look at the adress the seeded link points to. You'll also so find some password change portlet in Knowledge Exchange.

  • Problem with navigation and masthead by changing languages with Anonymous

    Hi All,
    i have a problem with navigation and masthead by changin the language when accessing as anonymous user.
    Ive created two additional users anon_de  (with language german )and anon_en (for english).
    I've created also two links in the in masthead:
    /irj/portal/anonymous?guest_user=anon_en and /irj/portal/anonymous?guest_user=anon_de
    When i choose "de" for the first time it works fine, but when i choose "en" again the language in the content are is changing to english again, but not in navigation and masthead. When i click again on link for "en" the languge is set to english. Strange thing is that when i click on "de" instead the portal content change to german but masthead and navigation are in english now, as it should be before....
    It seems that masthead and navigation have always prevoius language selected.
    Do you know, what could be the reason of that strange behavior?
    Thanks for help
    Karol

    Hi Detlev,
    you are right. the user is not "updated" fast enough... the strange thing is, that it works by the first time i change the language...
    well.. i can implement that workaround as you suposed, but it would be a really workaround as the same page will be requestes second time, causing requests number to be double..
    Thanks for help
    ps. i forgot to mark this message as question to give points.. if you tell me how i can change that ill reward your answer..

  • Create a Navigational Hierarchy for filtering with the Table API

    Hello,
    I've built a WAD report acourding to the how to document: "Create a Navigational Hierarchy for filtering with the Table API".
    It works great but i dont know How to make the hirarchey to show the key and the text.
    Please Advice.
    David

    Hi Kenneth,
    please have a look in the source of the executed Web Application. What is inside of the <div> with the id filter?
    You should also find a td tag with id hier_xyz with xyz the filter inside of the <div>-Tag with id filter.
    Also check whether you have a javascript error.
    Have a look on the Javascript function set_style. Perhaps you can paste it here, than I can have a look.
    Heike

  • A self running lesson and a chapter navigation option in the same file

    My client has asked if their lesson can have a branching option at the very beginning that allows the learner to watch the entire lesson without having to click a next button or experience pauses between chapters or modules and a second option to select a TOC type screen where they can choose the specific chapter they wish to watch and then when the chapter is finished, the learner can choose to continue to the next chapter or back to the TOC screen.
    I understand that I can create that branching scenario, but in my version, I would be replicating the entire lesson (about 140 slides) to create the two paths, one path with the pause/navigation for the chapters and one without.
    Is there a better way to accomplish this style of navigation and keep the file as small as possible?  My Java skills are at a beginner level, so please include specifics if the solution will use Java.
    Thanks for your help and ideas.

    You can achieve this using variables and Conditional Advanced Actions in Captivate.  But it would not be a job for a Captivate beginner.
    You need to use the branching slide to set the value of a variable that indicates the user's choice of whether to watch all content or use the menu slide.  Then you need to use Conditional Advanced Actions triggered by ON SLIDE ENTER events to skip certain slides and play others.  You'll also need to set up the Menu slide and again use variables and Conditional Advanced Actions to return users to it after completing sections.
    If you are unfamiliar with these concepts, I recommend you watch the tutorials on this site: http://lilybiri.posterous.com/
    Like I said, it's not a task for a beginner.

  • How to create a Navigation with submenu ? { Mega Navigation Menu} ?

    Please iam playing around with Flach Catalyst, but i cant find how to create a navigation menu with submenus
    i've created the design in photoshop but i dont know how to do the rest in Catalyst.
    the Navigation menu that i want is should be more or less like this
    Home          Contact        Gallery     Team                                                            { Now when i mouse over inTeam it shows a block with text and links that i
                                                                                                                               can be able to click them.}
    -------------------------------------------------------^---------------------------------- ---------------
                                           |---------------^-------------------------------------------------|
                                             Race Team                  |   Swim Team
                                          .....................................| .............................
                                             Football Team              |   NR Team
                                          .....................................|..............................
                                             Sprint Team                 |  Basketball Team
                                         ......................................|..............................
                                             Jump Team                  |  Water Team
                                         |.....................................................................|
    Please help me i've search on google but didnt found anything.
    Thank You

    Hi,
    This file may help. DropDownMenu.fxp (Right-click > Download Linked File to download this Fc CS5.5 file).
    It illustrates a simple drop-down menu.  Note that only the File menu has button items in it. 
    Best,
    Tanya

  • Create Notification Navigation Button not working in Order Objects Tab

    Hi Gurus,
    I am having an issue in Order --> Objects tab. I want to create notification for additional  technical objects for the order. When I enter the technical object details and press enter, a "Create Notification" navigation button gets activated for that line item. But when I press that button, nothing happens. On the other hand if a select multiple line items and then press "Create Notification" button at the bottom of the line items, I am able to create notifications for the selected line items.
    Can someone help me suggest what can be the problem or suggest a Note which might restore the functionality of the "Create Notification" navigation button at the line item level.
    Thanks in advance for the help.
    Best Regards
    Vikas Hali

    Vishal,
    I dont think the Notification Create Button from line item is pretty much dependent on the Customization Settings or any sap note concerning this has not been as yet brought into my notice. In my system, this is working appropriately. The problem with this which i can think of is either an authorization issue or you should raise an oss for this.
    Regards,
    Usman

  • Create a Navigation Pane for a Page Hierarchy

    Hi,
    I am writing a Oracle ADF fusion web application using JDeveloper 11.1.2.0.0. I want to create
    a navigation pane. For that I hope to use a declarative component. Please give me a tip to create a tree model as follows
    URL : http://jdevadf.oracle.com/adf-richclient-demo/faces/components/pagehierarchy/index.jspx?_afrRedirect=3006461401899918
    and how to put it in a jsf which looks as following page's box
    URL : http://jdevadf.oracle.com/adf-richclient-demo/faces/components/pagehierarchy/page.jspx?_afrRedirect=3007271059448986
    Thanks
    Sameera

    Hi,
    within one post, you covered three topics. If you are new to ADF what about starting with a tutorial. The way you ask your questions will give you answers based on a POJO components model and not ADF. Many of the implementation details however are not required using ADF. So is it really that you only want to use the ADF Faces components ? If so then the demo sources you pint us to can be downloaded from here
    http://www.oracle.com/technetwork/developer-tools/adf/documentation/adf-faces-rc-demo-083799.html
    Frank

Maybe you are looking for