Can you return a view name directly from a JSF action? I wasn't aware of that.
Even with annotations abbreviating things here, I would still argue in favor of logical outcomes mapping to view paths. I find that my paths change more frequently (at least during dev) than my outcomes AND tend to be longer strings than my logical outcome names. As purely a personal preference, I like the separation.
Ryan
"norman.richards@jboss.com" wrote:
Can you return a view name directly from a JSF action? I wasn't aware of that.
The other benefit I can see with this is to get "global" outcome support with annotations is simply with constants.
public class A {
@NagivigationRule(outcome=JsfNavOutcome.FAILED,
view=JsfView.ERROR_PAGE)
public String a() {}
}
public class B {
@NagivigationRule(outcome=JsfNavOutcome.FAILED,
view=JsfView.ERROR_PAGE)
public String a() {}
}
This could lead to all things, possibly even using EL expressions as the view ID and such. As a result, I think it would become much more flexible (although possibly harder to maintain) than normal XML nav.
Or perhaps I am just over doing design eh?