MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-278

allow multiple redirects via view-configs

    Details

      Description

      see http://mail-archives.apache.org/mod_mbox/myfaces-users/201203.mbox/%3CCAPyf0geF3aQkhqrCi-7EE293FAai76fzC7t90ehE%3D8NLyPQUrw%40mail.gmail.com%3E

      workaround without redirect - example:

      //...
      public class CustomPageBean
      {
      @Inject
      private ViewConfigResolver viewConfigResolver;

      @PreRenderView
      protected void showCustomView()

      { ViewConfigDescriptor viewConfigDescriptor = this.viewConfigResolver.getViewConfigDescriptor(CustomView.class); FacesContext facesContext = FacesContext.getCurrentInstance(); ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); UIViewRoot targetView = viewHandler.createView(facesContext, viewConfigDescriptor.getViewId()); facesContext.setViewRoot(targetView); }

      }

      //+ configure CustomPageBean as page-bean

        Activity

        José Luis Cetina (maxtorzito) created issue -
        Gerhard Petracek made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.0.5 [ 12319883 ]
        Resolution Fixed [ 1 ]
        Gerhard Petracek made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Gerhard Petracek made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        Description http://mail-archives.apache.org/mod_mbox/myfaces-users/201203.mbox/%3CCAPyf0geF3aQkhqrCi-7EE293FAai76fzC7t90ehE%3D8NLyPQUrw%40mail.gmail.com%3E see http://mail-archives.apache.org/mod_mbox/myfaces-users/201203.mbox/%3CCAPyf0geF3aQkhqrCi-7EE293FAai76fzC7t90ehE%3D8NLyPQUrw%40mail.gmail.com%3E

        workaround without redirect - example:

        //...
        public class CustomPageBean
        {
            @Inject
            private ViewConfigResolver viewConfigResolver;

            @PreRenderView
            protected void showCustomView()
            {
                ViewConfigDescriptor viewConfigDescriptor = this.viewConfigResolver.getViewConfigDescriptor(CustomView.class);

                FacesContext facesContext = FacesContext.getCurrentInstance();
                ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
                UIViewRoot targetView = viewHandler.createView(facesContext, viewConfigDescriptor.getViewId());

                facesContext.setViewRoot(targetView);
            }
        }

        //+ configure CustomPageBean as page-bean
        Gerhard Petracek made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Gerhard Petracek made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Gerhard Petracek made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Gerhard Petracek made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Gerhard Petracek
            Reporter:
            José Luis Cetina (maxtorzito)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development