JSF using constants in faces-config in <navigation-case>
Is it necessary to hardcode values in in faces-config.xml or is it possible to define all from-outcome values as constants in one pla开发者_StackOverflowce and then reference them from faces-config.xml as well as from backing bean methods?
Yes, in at least JSF 1.x it's necessary. A common approach is however to use the filename of the target file as outcome value. Filenames usually doesn't change throughout the application's lifetime. In JSF 2.x you can however take benefit of implicit navigation. If you use the filename as navigation outcome, then there's no need to define a navigation case.
精彩评论