You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org> on 2011/02/06 04:32:30 UTC

[jira] Resolved: (EXTCDI-125) pagebeans as package based inline view-configs

     [ https://issues.apache.org/jira/browse/EXTCDI-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek resolved EXTCDI-125.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.3

> pagebeans as package based inline view-configs
> ----------------------------------------------
>
>                 Key: EXTCDI-125
>                 URL: https://issues.apache.org/jira/browse/EXTCDI-125
>             Project: MyFaces CODI
>          Issue Type: Improvement
>          Components: JEE-JSF12-Module, JEE-JSF20-Module
>            Reporter: Gerhard Petracek
>             Fix For: 0.9.3
>
>
> it should be possible to use @Page directly at page-beans.
> rules:
>  * if @Page is used at a class which also hosts @Named or @ManagedBean, there shouldn't be a veto
>  * instead of nested classes btw. interfaces one part of the package info should be used
>  * in the root package there has to be a marker class with the annotation @InlineViewConfigRoot(optionally an explicit basePath should be possible)
>  * the page-bean class is automatically used as view-controller
> example 1:
> package my.package.pages;
> @InlineViewConfigRoot
> public final class Pages
> {
> }
> package my.package.pages.registration;
> //...
> @Named
> @RequestScoped
> @Page
> public class RegistrationStep1 implements ViewConfig
> {
>   public Class<? extends ViewConfig> confirm()
>   {
>     //...
>     return RegistrationStep2Page.class;
>   }
> }
> //will be interpreted as /pages/registration/registrationStep1.xhtml
> example 2:
> package my.package.pages;
> @InlineViewConfigRoot(basePath = "/pages/", pageBeanPostfix = "Page")
> public final class Pages
> {
> }
> package my.package.pages.registration;
> //...
> @Named
> @RequestScoped
> @Page
> public class RegistrationStep2Page implements ViewConfig
> {
>   //...
> }
> //will be interpreted as /pages/registrationStep2.xhtml
> example 3:
> package my.package.pages;
> @InlineViewConfigRoot(basePath = "/*", pageBeanPostfix = "Page")
> public final class Pages
> {
> }
> package my.package.pages.registration;
> //...
> @Named
> @RequestScoped
> @Page
> public class RegistrationStep3Page implements ViewConfig
> {
>   //...
> }
> //will be interpreted as /registration/registrationStep3.xhtml
> example 4:
> package my.package.pages;
> @InlineViewConfigRoot(basePath = "/views/*")
> public final class Pages
> {
> }
> package my.package.pages.registration;
> //...
> @Named
> @RequestScoped
> @Page
> public class RegistrationStep4 implements ViewConfig
> {
>   //...
> }
> //will be interpreted as /views/registration/registrationStep4.xhtml

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira