One of the big benefits of Seam over plain JSF is that if you want, you can eliminate all
"logic" XML and have just a sprinkling of "configuration" XML. In
fact, you will see this point made by Michael Yuan in the JBoss Seam book. However, one of
the coolest features of Seam, page actions, is not available without the use of XML.
Currently, you must define your actions using a value-binding expression in the pages.xml
file (or, alternatively, in *.page.xml files).
I am proposing that a @PageActions (and its complement @PageAction) annotation be added to
at the method level. The annotation would appear like so:
@PageActions {
| @PageAction(view="/view1.xhtml", if="#{user.loggedIn}"),
| @PageAction(view="/view2.xhtml")
| }
| public String beforeYouRender() { ... }
and
@PageAction(view="/view3.xhtml")
| public String notSoFast() { ... }
I agree that it may become difficult to track which methods are being used as page
actions, if you think in terms of pages. However, by the same token, you may think in
terms of classes, and then it is easy to find the associated page. It is, of course,
personal taste. I just find that if we can allow the user to skip the XML coding, why not
give them that option?
Feel free to vote on this issue:
http://jira.jboss.com/jira/browse/JBSEAM-1631
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062740#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...