Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: 1.2
    • Component/s: Uncategorized
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      433

      Description

      JSF 2.0 should provide support for view controllers – backing beans whose
      methods can be defined at certain points in the lifecylle. JSF 1.2 attempts to
      solve the lack of phase event listeners for backing beans with the ability to
      register PhaseListener instances and method expressions on the view root. This
      is nice, but it’s still not as flexible as solutions such as Shale’s
      ViewController which call specific methods on your backing bean for different
      phases. The latter approach is more flexible and easier to use, I believe.
      Consequently, I believe we should extend the JSF 1.2 support to, at the very
      least, provide default callback methods on a backing bean (via an interface or
      annotations, like Shale [1] or NetBeans Visual Web pack, or MyFaces Orchestra [3]).

      [1] http://shale.apache.org/shale-view/index.html
      [2] http://myfaces.apache.org/orchestra/myfaces-orchestra-core/viewController.html

      Here is Ken's response on the EG:

      Subject: Re: [NEW] ViewController
      From: Ken Paulsen <Ken.Paulsen@SUN.COM>
      Reply-To: Java Community Process JSR #314 Expert List <JSR-314-EG@JCP.ORG>
      Date: Tue, 8 Apr 2008 17:58:20 -0700
      Content-Type: text/plain

      Would publishing events for these "different phases" satisfy this
      requirement? Do you have a list of the "different phases" in mind that
      you think should be included in the spec? Are they: init, preprocess,
      prerender, and destroy?

      Looking at the descriptions from
      http://shale.apache.org/shale-view/index.html they appear to be a small
      subset of a larger set of events that should exist. And the naming could
      use work.

      JSFTemplating provides:

      • initPage - Similar to shale's init, but BEFORE any view is created –
        very useful
      • beforeCreate - Associated with any UIComponent, fired before its created
      • afterCreate - Same, but after
      • beforeEncode - Associated w/ any UIComonent, fired before it is encoded
      • afterEncode - Same, but after
      • command - Essentially the same as "actionListener", except it supports
        "handlers".
      • decode – Same as Renderer.decode(), except it supports "handlers."

      It does not have a "destroy" event, but it sounds like a good idea,
      preprocess... not sure its useful (if beforeCreate exists), but it can't
      hurt . prerender looks like a UIViewRoot-only version of beforeEncode.
      It has a few more standard ones, plus they're extensible, for more info see:

      https://jsftemplating.dev.java.net/doc/eventsHandlersList.html

      Ken

      Kito D. Mann wrote:
      >
      > Hello everyone,
      >
      > JSF 1.2 attempts to solve the lack of phase event listeners for
      > backing beans with the ability to register PhaseListener instances and
      > method expressions on the view root. This is nice, but it’s still not
      > as flexible as solutions such as Shale’s ViewController which call
      > specific methods on your backing bean for different phases. The latter
      > approach is more flexible and easier to use, I believe. Consequently,
      > I believe we should extend the JSF 1.2 support to, at the very least,
      > provide default callback methods on a backing bean (via an interface
      > or annotations, like Shale or NetBeans Visual Web pack).
      >
      > This isn’t a high priority right now, but I want to make sure we
      > tackle this as some point, since the implementation is fairly trivial.
      >
      > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      > Kito D. Mann - Author, JavaServer Faces in Action
      > http://www.virtua.com <http://www.virtua.com/> - JSF/Java EE
      > consulting, training, and mentoring
      > http://www.JSFCentral.com <http://www.jsfcentral.com/> - JavaServer
      > Faces FAQ, news, and info
      > phone: +1 203-653-2989
      > fax: +1 203-653-2988
      >

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Ryan is collecting a list of events and viewController will be on it. We'll have another issue for that one.

          Show
          Ed Burns added a comment - Ryan is collecting a list of events and viewController will be on it. We'll have another issue for that one.
          Hide
          driscoll added a comment -

          It's not that we won't fix it (which is the current status), it's that we're
          probably going to fix it later - I'm changing the status to reflect that.

          Show
          driscoll added a comment - It's not that we won't fix it (which is the current status), it's that we're probably going to fix it later - I'm changing the status to reflect that.
          Hide
          driscoll added a comment -

          It's not that we won't fix it (which is the current status), it's that we're
          probably going to fix it later - I'm changing the status to reflect that.

          Show
          driscoll added a comment - It's not that we won't fix it (which is the current status), it's that we're probably going to fix it later - I'm changing the status to reflect that.
          Hide
          Ed Burns added a comment -

          Prepare to delete "spec" subcomponent.

          Show
          Ed Burns added a comment - Prepare to delete "spec" subcomponent.
          Hide
          Ed Burns added a comment -

          Move all to 1.2

          Show
          Ed Burns added a comment - Move all to 1.2
          Hide
          Manfred Riem added a comment -

          Closing resolved issue out

          Show
          Manfred Riem added a comment - Closing resolved issue out

            People

            • Assignee:
              javaserverfowner
              Reporter:
              kito75
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: