[forge-issues] [JBoss JIRA] (FORGE-2468) Being able to add methods to an existing JSF backing bean

George Gastaldi (JIRA) issues at jboss.org
Thu Sep 3 22:50:00 EDT 2015


     [ https://issues.jboss.org/browse/FORGE-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Gastaldi updated FORGE-2468:
-----------------------------------
    Labels: Starter  (was: )


> Being able to add methods to an existing JSF backing bean
> ---------------------------------------------------------
>
>                 Key: FORGE-2468
>                 URL: https://issues.jboss.org/browse/FORGE-2468
>             Project: Forge
>          Issue Type: Sub-task
>          Components: Java EE
>    Affects Versions: 2.19.0.Final
>            Reporter: Antonio Goncalves
>              Labels: Starter
>             Fix For: 2.x Future
>
>
> It would be good to be able to add methods to a JSF backing bean with the following command : 
> {code}
> faces-add-method --named myMethod
> {code}
> Most of the JSF methods return a String which is the page to go to (null means "go to the current page"). This would add the following {{myMethod}} method to the existing backing bean : 
> {code}
> @Named
> public class MyBackingBean {
>     public String myMethod() {
>       return null;
>     }
> {code}
> We could also have a outcome parameter which will be the page to go to : 
> {code}
> faces-add-method --named myMethod --outcome main.xhtml
> {code}
> Gives : 
> {code}
> @Named
> public class MyBackingBean {
>     public String myMethod() {
>       return "main.xhtml";
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the forge-issues mailing list