- design discussion for adding @PageActions (@PageActi 2007-07-10 - By dan.j.allen
Back 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 @(protected) (and its complement @(protected)) annotation be added to at the method level. The annotation would appear like so:
@(protected) { | @(protected)(view="/view1.xhtml", if="#{user.loggedIn}"), | @(protected)(view="/view2.xhtml") | } | public String beforeYouRender() { ... }
and
@(protected)(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 (See http://EAM-1631.ora-code.com)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4062740#4062740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4062740 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|