Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1926 Adding more commands to Forge and improve existing ones
  3. FORGE-2468

Being able to add methods to an existing JSF backing bean

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Major Major
    • 3.x Future
    • 2.19.0.Final
    • Java EE

      It would be good to be able to add methods to a JSF backing bean with the following command :

      faces-add-method --named myMethod
      

      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 :

      @Named
      public class MyBackingBean {
      
          public String myMethod() {
            return null;
          }
      

      We could also have a outcome parameter which will be the page to go to :

      faces-add-method --named myMethod --outcome main.xhtml
      

      Gives :

      @Named
      public class MyBackingBean {
      
          public String myMethod() {
            return "main.xhtml";
          }
      

              Unassigned Unassigned
              agoncal Antonio Goncalves (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: