Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

What is declarative navigation?

 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Every time I try to learn about JSF I encounter this term, without any explanation of what it is. Could someone please explain?
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anybody correct me if I'm wrong on this but...

From my understanding declarative navigation is when you declare in the config files where you will go if you click a particular button. For instance, on your actual jsf page you might have a button that looks like this:



Then in your config.xml files you'll have something like this:



So in your button you're not actually hard-coding the location of a file, but rather a string. Your config files know that whenever that particular string gets returned, it should send you to whatever place you have set up in your xml files.

That's my understanding anyway, somebody please let me know if I'm wrong.

 
Saloon Keeper
Posts: 24898
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Declarative" anything in programming terms means that instead of Java code (or whatever language), you're defining something in a simpler, less flexible way. Declarative notation normally has no conditional constructs[*] and the overall syntax is simpler, making it easier to validate the declarations than it would be to debug Java code.

I put the asterisk [*] next to "no conditional constructs" because you can make a navigational rule conditional (contingent on an EL expression result), but what I mean is that the individual navigational rules themselves support nothing like an if/then/else or do/while structure.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic