• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Similarities between Faces Flows and Spring Web Flow

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

a while ago I wrote a blog discussion the difficulties we encounter with JSF when we have too much Ajax functionality which can be found here.

https://mehmetsalgar.wordpress.com/2014/05/22/extremely-ajaxified-web-application-with-spring-webflow-primefaces-and-state-machines/

In the mentioned project in this blog I used Spring Web Flow to satisfy some requirements but now that development of the Spring Web Flow stopped I like to check what Faces Flows can present to satisfy the same requirements.

From a quick look similarities between Spring Web Flow and Faces Flows are obvious but there is one specific point I like to ask.

In SWF it is possible to define flowing element at the beginning of an flow.



which will trigger an event when you will start executing a flow, I look to the Faces Flows flow descriptors but I can see an element that fullify similar requirement.

Can anybody tell me a similar functionality built into the Faces Flow or not?

And is there a way to configure Faces Flows that it reacts to events from the users like the following.



Thanks in advance.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think probably the closest approximation to built-in workflow notifications in JSF are what you'd get using Conversation Scope.

The idea of being notified when something validates in JSF is meaningless. JSF validates all incoming values in a single lifecycle stage. If any of those values fails to validate, the appropriate errors are generated and the JSF lifecycle short-circuits. If, instead, all values validate, the next lifecycle phase runs any ValueChangeListeners that may have been assigned (for values that have changed), followed by posting the changed values to the Model (backing bean). You could employ a phase listener to run when the lifecycle advanced to the next phase, that's about it.
 
Mehmet Salgar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The event I mention is attached to the lifecycle of the flow not to the JSF.

So what I was expecting Faces Flow being so similar to the SWF it will also raise en event when a flow starts.
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF, as originally conceived was based on the idea of working with individual HTML form pages.

Workflows - where a sequence of related pages is processed - was not a primary design goal.

Since, in the real world, multiple pages is probably more common than not, some efforts have been made to support the workflow concept. But as far as I am concerned, there's a long way to go before JSF handles that smoothly.
 
reply
    Bookmark Topic Watch Topic
  • New Topic