alwin-joseph / target-test-jsf-issue-migration

This is to tet -jsf-issue-migration
0 stars 0 forks source link

Support "view controllers" #433

Closed alwin-joseph closed 14 years ago

alwin-joseph commented 16 years ago

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:

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) <[http://www.virtua.com/](http://www.virtua.com/)> - JSF/Java EE
consulting, training, and mentoring
[http://www.JSFCentral.com](http://www.JSFCentral.com) <[http://www.jsfcentral.com/](http://www.jsfcentral.com/)> - JavaServer
Faces FAQ, news, and info
phone: +1 203-653-2989
fax: +1 203-653-2988

#### Environment
Operating System: All
Platform: All
#### Affected Versions
[2.0]
alwin-joseph commented 5 years ago
alwin-joseph commented 16 years ago

@glassfishrobot Commented Reported by kito75

alwin-joseph commented 16 years ago

@glassfishrobot Commented @edburns said: Ryan is collecting a list of events and viewController will be on it. We'll have another issue for that one.

alwin-joseph commented 16 years ago

@glassfishrobot Commented driscoll said: 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.

alwin-joseph commented 16 years ago

@glassfishrobot Commented driscoll said: 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.

alwin-joseph commented 14 years ago

@glassfishrobot Commented @edburns said: Prepare to delete "spec" subcomponent.

alwin-joseph commented 14 years ago

@glassfishrobot Commented @edburns said: Move all to 1.2

alwin-joseph commented 10 years ago

@glassfishrobot Commented @manfredriem said: Closing resolved issue out

alwin-joseph commented 16 years ago

@glassfishrobot Commented Issue-Links: blocks JAVASERVERFACES_SPEC_PUBLIC-240

alwin-joseph commented 16 years ago

@glassfishrobot Commented Was assigned to javaserverfowner

alwin-joseph commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-433

alwin-joseph commented 14 years ago

@glassfishrobot Commented Marked as won't fix on Thursday, March 4th 2010, 6:09:29 am