How can I make a navigation dependend on the database content with JSF?

Hi,
I want to navigate dynamicly between pages, but pages which addresses that are taken from database. I want to take a list of page's addresses (links) from database, and while application is running, I want to generate on my page that working links. This is functionality demanded by my little CMS (Content Management System), to enable me to add and delete pages and links between them.
But is it possible by JSF?
As far as I could find out, JSF provides such possibilities (faces-config.xml) :
<navigation-rule>
    <from-view-id>/logon.jsp</from-view-id>
         <navigation-case>
              <from-action>#{LogonForm.logon}</from-action> /*logon - function returning String as an 'outcome'*/
               <from-outcome>success</from-outcome> /*outcome*/
                <to-view-id>/storefront.jsp</to-view-id> /*concrete page*/
           </navigation-case>I need something like that:
<navigation-rule>
    <from-view-id>/logon.jsp</from-view-id>
       <navigation-case>
          <from-action>#{WhichPage.address</from-action> /*different pages' addresses
           <from-outcome></from-outcome> /*outcome not needed*/
           <to-view-id>#{WhichPage.address}</to-view-id>  //different pages' addresses from db
       </navigation-case>or just function which return directly the address of the target page (read from db). But is it possbile with JSF?
So far only figured out one not good enough way: to add all the pages' addresses to the faces-config.xml file:( But as you can imagine, the more link I would add, the bigger mess in config file I would create.
Thanks in advance for any suggestion or advice,
Regards.
T.K.

You can implement a NavigationHandler
public class NavigationManager extends NavigationHandler {
     private NavigationHandler _base;
     public NavigationManager(NavigationHandler base)
          super();
          _base = base;      
     public void handleNavigation(FacesContext context, String actionMethod, String actionName) {
          // Put some code here, you can create a NavigationCase and a NavigationRule
          // with RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext);
          _base.handleNavigation(context, actionMethod, actionName);
}

Similar Messages

  • I changed the captions for my family photos to include names, but when I exported the photos to make DVD's for family members, the old captions were there and not the new ones. How can I make a DVD to include the new captions with names?

    I have labeled old family photos with names that I would like to share at a family reunion via DVD. When I export the photos to make the DVD, the old photo labels are back rather than the new labels with names. Can I export the photos with the new titles?

    iPhoto shows you these Titles but the Finder shows you Filenames
    If you export (File -> Export) you'll get the Export dialogue. Note the option at FileName to use the Title as filename for the exported photo

  • How can I make my Shuffle stay in the Source list with Version 7??

    No longer in the IPOD options that I can see????

    Blackstar,
    Unfortunately, for reasons unknown, the Keep this iPod in the source list option does not exist in iTunes 7.
    So the first thing you will probably want to do is let Apple know your feelings on the matter by submitting the form on this support page .
    Done that? Okay then, so now you'll probably want to make the best of the situation by figuring out if there's any kind of workaround to deal with the matter.
    The best I can come up with is suggest that you create a playlist dedicated to your iPod shuffle which, for discussion's sake, we can call the Shuffle Playlist.
    Once you have created that playlist, when you connect your shuffle to your computer you can drag the Shuffle Playlist into your shuffle.
    After disconnecting the shuffle you can get to work on modifying the Shuffle Playlist for your next update.
    Note that you will have to manually clear the iPod shuffle's contents before putting a new Shuffle Playlist on it.

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How can i add a navigation rule at the runtime of JSF?

    Hello,
    how can i add a navigation rule at the runtime of JSF. Maybe i should use the method "addNavigationRule()" in class "FacesConfig", but i do not know, how can i obtain the instance of class "FacesConfig". Can anybody help me?
    Thank you very much!!!

    Just curious: Why whould you want to add navigation Rules at run time. I believe the navigation rules should be set to begin with - "by s/w Architect Design".
    Else you can always use Redirect / Forward.

  • When i burn videos to a dvd-r disc it works on my macbook but not on a windows/pc or my dvd player. How can i make it work on all the above and not just a mac product?

    when i burn videos to a dvd-r disc it works on my macbook but not on a windows/pc or my dvd player. How can i make it work on all the above and not just a mac product?

    Unfortunately, the recording & movie industry does not respect the rights of the people who make them money, and thus you can only use the paid-for content in ways they see fit. Even if I lived in a bunker where no one else could possibly see the movie I paid for, therefor I'm not 'sharing it illegally', I would still not be allowed in a blue moon to copy that movie to DVD for TV viewing. Someone will tell you to get an AppleTV. How about Apple give us one for free? Until this changes, people wanting to use their content in multiple locations will continue to download music & movies via torrents, legally or illegally.

  • How can you make your persona show on the top and bottom? Also can you make it bigger at the top to show more of the picture?

    How can you make your persona show on the top and bottom?
    Also can you make it bigger at the top to show more of the picture?

    Add extra empty toolbars if you want to see more of the persona.<br />
    You can create extra toolbars to get extra space via View > Toolbars > Customize<br />
    You have to put something on a toolbar (drag a Space item onto it) before closing the Customize window because empty toolbars are automatically removed.<br />
    See http://kb.mozillazine.org/Toolbar_customization

  • How can I make a survey automatically identify the user in the results?

    How can I make a survey automatically identify the user in the results (so that it won't be anonymous)?

    I am not sure what information to provide.  Here is what I am trying to do.  I am trying to create an HR questionnaire with multiple choice questions and several multiline textboxes to capture comments.  I want to send it out by email address and/or embed the questionnaire somewhere on the company's intranet website.  But we don't want the questionnaire to be anonymous. If someone makes a particular comment, we want to be able to communicate with the person who made that particular comment.  How would we be able to trace the person? By email address, or by user ID?

  • How can I make an appointment to see the staff to repair

    How can I make an appointment to see the staff to repair

    If in US
    http://www.apple.com/retail/storelist/

  • How can I make Calen Mob pick up the right colors

    How can I make Calen Mob pick up the right colors from Google Calendar. In fact, how can I contact the developer that made Calen Mob Pro. I hear it was Blue tag but they either sold it or dropped it because they make no claim for it.  Does anyone kknow of a group calendar for IOS that will report the color choices as well as the  data? Calenmob Pro just brings in one color for every date and appt. Thanks!

    Where did you get LR2.2? The most recent public version is LR2.1!
    Try an external EXIF reader like EXIFReader.
    Don

  • How can I make Azure blob give me "206 Partial content" for mp4. Getting 200

    I want a video for my web-site, so I am using html+JavaScript found on view-source:https://www.airbnb.com/ 
    see id="pretzel-video"
    and script starting from   var video = $("#pretzel-video");
    The point is - if I copy html+JavaScript on my web-site, I can get "206 Partial content" from  airbnb.com, i.e. the video hosted on airbnb.com starts streaming immediately. 
    The same thing happens if I upload the same video to my domain hosted on arvixe.com and S3 Amazon
    The only provider that doesn't give me 206, but responds with 200 instead is Azure blob
    This is unacceptable, because the user has to wait until all the video is loaded.
    So how can I make Azure blob give me  "206 Partial content". I am hosting web-site on Azure also. 
    I am using airbnb.com video in all three cases to exclude possible errors related to codek etc.

    Hi Chao 
    Azure Blob storage  supports return 206 response if you're using API version 2011-01-18 or later . 
    However if
    don't originate the request which means you can't specify this using the request header , you can set the API version globally
    for blob service within  a storage account by using " Set
    Blob Service Properties" API , 
    If the above still couldn't solve your issue, we suggest you please contact Microsoft Azure technical support for further assistance.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Regards,
    Serena Yu
    Microsoft Online Community Support

  • Realtek network card seems to be disappeared. how can i make it visible again for the OS?

    i can't access my LAN card. somehow it is disappeared. how can i make it visible again for the OS? my OS is windows 7. thanks very much for your help

    right click on the button bar, then select "customize toolbar", drag any button you like into the toolbar and you're done!
    Diego

  • How can I make an image placed in the body tag expand to the entire width of the browser?

    How can I make an image placed in the body tag expand to the entire width of the browser?I

    background-repeat -- best used with small image tiles.
    background-gradient  - Ultimate CSS Gradient Generator - ColorZilla.com
    background-size:cover - Resizable Full Page Background Image
    Nancy O.

  • TS4293 How can I make iMovie to show me the AVCHD files importet by iPhoto?

    My iMovie 11 shows the videos from my iPhone importet by iPhoto, but not all the videos importet the same way from my camera. It works fine with the videos recorded in MP4 but not at all with the AVCHD. How can I make iMovie to show me the AVCHD files? iPhoto imports and shows the AVCHD fine. Also I could import the AVCHD files with iMovie but then they would be twice on my computer and use a  lot of space.
    thanks for your help

    Right now, iMovie won't edit AVCHD wrapped files. You have a few options:
    1. Import the videos with iMovie. Afterwards, you may add the imported movies to iPhoto if you want.
    2. Import the videos with another app. (Too numerous to mention.)
    3. Convert the videos with a third-party tool.
    4. Wait for a future version of iMovie that adds this capability.

  • I only see the phone numbers of my contacts when using iMessage on my MAC, whereas I see the names on my iPhone. Why, and how can I make it so I see the names (and pics) on my MAC?

    I only see the phone numbers of my contacts when using iMessage on my MAC, whereas I see the names on my iPhone. Why, and how can I make it so I see the names (and pics) on my MAC?

    Thanks Eric, but that was already turned on. I just now tried turning it off and on again, no change. Actually, I"m more interested in seeing the names than the pictures. I now only see the phone numbers and generic avatars where pics would be.

Maybe you are looking for