Sylvain Vieujot schrieb:
I don't think we should rule out the use of annotations for navigation
rules.
Even if navigation rules are tied to the presentation layer, so are bean
names.
Actually I do not think there is a need for that.
There is a more elegant solution to the problem, than using annotations.
Implicit nav handling, that could be done without even having to touch
annotations or breaking anything.
I will give an example
usually you have a nav handler
with a from outcode ... navigate to... structure
well what would happen if we would have a basic automatic outcome to ...
mapping mechanism easily doable with a custom navhandler, which then can
be overridden by navigational entries.
What I am talking here is something along the lines:
void doAction() {
...
return "mainPage"
}
without any mapping would route into something like
/mainPage.jsf
and something like
void doAction() {
...
return "submodule/detailPage"
}
would route implicitely into
/submodule/detailPage.jsp
if you then want to override this behavior, set a custom nav entry for
mainPage and for submodule/detailPage the way it used to be.
This is way more elegant than using annotations for such a thing.