NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Javalobby author, Steven Devijver, gives Javalobby its first look at the new Spring Web Flow. Read on to follow Steven as he guides you through the XML and Java to create powerful web work flows.
Hi!
I am not finished the whole article yet, but when I saw the form with the hidden fields _flowcontrol and _eventId, the question came to mind:
it seems that after changing the url in browser location bar by substituting these hidden fields you can be faced with any transition state you want to? So... where is transition control, in any case you have to check if you allowed to perform the given action state.
But may be I mistake, I will keep reading
You cannot make whatever state transition. Web Flow uses a state machine identified by the _flowExecutionId parameter to keep track of your session.
When you go through a page flow the state machine knows which state you are in, you cannot cheat it. You are only allowed to make the state transitions that are defined for the state you are currently in.
The _eventId parameter lets you choose which one of the allowed state transitions you want to make.
Hi Steven!
thank you for the reply,
Yes, it's all make sense, its true, correct, right,
but if the flow id stored in session, why you neeed to put it in each submit form as hidden field, as stated in article:
"This id must be available as a parameter in each HTP request", so if its must, than it make sense and has logic, although you can override it in browser location bar...
So, is your page flow determined by the flowexecutionId value from session and the _eventId from request?
Ok, the issue that pushed me to submit a question is - the web flow control elements are available in the front end as the request parameters and could be manipulated by the advanced user.
First of all, the state engine (or page flow session) is typically stored in the HTTP session, however it can also be persisted to a file system or a database if you want to. The separate flow execution id allows Web Flow not to be bound to the HTTP session or cookies.
Secondly, the state engine is specific for each session. You can indeed alter the id and try to brute force yourself into another page flow session. Changes of success however are very slim since the flow execution id is a randomly generated number.
Thirdly, each request is linked to a page flow session by means of the _flowExecutionId parameter. The _eventId parameter tells the state engine which transition to make. They are both required but serve different functions.
you have some view state in your browser, you are not yet finishing this page flow, just on some transition.. Than you press Ctrl + N, open new browser window and go another way.. So one session -> 2 flows
Wierd stuff, but ok, that I have in mind...
It doesn't matter how you navigate through the page flow. Whatever happens, once you make a state transitions the pointer move with you in the page flow session. So one of the two windows will try to make a - possibly - illegal state transition when you proceed in the page flow.
Steven is correct in the default case: if you do a CTRL-N to new window you'll be updating server-side state, and thus your other window will then not be in sync with the server.
However, SWF is pretty sophisticated ... we also provide support for continuations, which help ensure stable browser navigation button and new window usage. In that case a new copy of the flow execution will be created for each window at that point, and the two will run independently.
I noticed the continuations stuff today as I was working with SWF. Is it possible to define a default flow to use with the continuations code when doing portlets? I don't really want to have to pass in the flow to use in the url, as I may not always have control over it (ie. edit button in a portlet). Passing in a flow is the only way the continuations sample shows.
When launching a new flow execution, if you don't pass in the _flowId you'll need to configure a controller for each flow definition you want to export at a specific request URL. That's pretty easy to do (see how the Phonebook sample does this), but I'd typically recommend not going that route as webflows are designed to be URL independent.
Keith,
Quite interesting. So in that case there are 2 sessions with the same login id. Will it not create big mess?
With that I have a couple of questions:
1. How to integrate 2 webflow scenario when user clicks ctrl-n.
2. For implementation of webflow do I need to integrate with JSF or Strus? Or I pure spring webflow replaces presentation tire responsibilites from Struts or JSF.
Keith,
Quite interesting. So in that case there are 2 sessions with the same login id. Will it not create big mess?
With that I have a couple of questions:
1. How to integrate 2 webflow scenario when user clicks ctrl-n.
2. For implementation of webflow do I need to integrate with JSF or Strus? Or I pure spring webflow replaces presentation tire responsibilites from Struts or JSF.
Hi Steven,
I have gone through your article, its a greate article.
Its look like to me that spring webflow is lot similar to bea pageflow.
I am thinking of implementing my new application using spring webflow. But my confusion is can I directly use spring webflow without intgration of JSF or struts.
I believe it is a better approach to do the things with 1 technology then the integration of 2-3 technology.
Spring Web Flow Examined
At 9:46 AM on Jul 5, 2005, Matthew Schmidt wrote:
Fresh Jobs for Developers Post a job opportunity
Read on for the whole article!
20 replies so far (
Post your own)
Re: Spring Web Flow Examined
Hi!I am not finished the whole article yet, but when I saw the form with the hidden fields _flowcontrol and _eventId, the question came to mind:
it seems that after changing the url in browser location bar by substituting these hidden fields you can be faced with any transition state you want to? So... where is transition control, in any case you have to check if you allowed to perform the given action state.
But may be I mistake, I will keep reading
Thanks for article!
Re: Spring Web Flow Examined
You cannot make whatever state transition. Web Flow uses a state machine identified by the _flowExecutionId parameter to keep track of your session.When you go through a page flow the state machine knows which state you are in, you cannot cheat it. You are only allowed to make the state transitions that are defined for the state you are currently in.
The _eventId parameter lets you choose which one of the allowed state transitions you want to make.
Does this make sense to you?
Re: Spring Web Flow Examined
Hi Steven!thank you for the reply,
Yes, it's all make sense, its true, correct, right,
but if the flow id stored in session, why you neeed to put it in each submit form as hidden field, as stated in article:
"This id must be available as a parameter in each HTP request", so if its must, than it make sense and has logic, although you can override it in browser location bar...
So, is your page flow determined by the flowexecutionId value from session and the _eventId from request?
Ok, the issue that pushed me to submit a question is - the web flow control elements are available in the front end as the request parameters and could be manipulated by the advanced user.
Re: Spring Web Flow Examined
Hi again,Is it possible to follow several page flows within one session using spring Web Flow?
Thanks
Re: Spring Web Flow Examined
First of all, the state engine (or page flow session) is typically stored in the HTTP session, however it can also be persisted to a file system or a database if you want to. The separate flow execution id allows Web Flow not to be bound to the HTTP session or cookies.Secondly, the state engine is specific for each session. You can indeed alter the id and try to brute force yourself into another page flow session. Changes of success however are very slim since the flow execution id is a randomly generated number.
Thirdly, each request is linked to a page flow session by means of the _flowExecutionId parameter. The _eventId parameter tells the state engine which transition to make. They are both required but serve different functions.
Steven
Re: Spring Web Flow Examined
What scenario do you have in mind?Re: Spring Web Flow Examined
you have some view state in your browser, you are not yet finishing this page flow, just on some transition.. Than you press Ctrl + N, open new browser window and go another way.. So one session -> 2 flowsWierd stuff, but ok, that I have in mind...
Re: Spring Web Flow Examined
It doesn't matter how you navigate through the page flow. Whatever happens, once you make a state transitions the pointer move with you in the page flow session. So one of the two windows will try to make a - possibly - illegal state transition when you proceed in the page flow.Re: Spring Web Flow Examined
Steven is correct in the default case: if you do a CTRL-N to new window you'll be updating server-side state, and thus your other window will then not be in sync with the server.However, SWF is pretty sophisticated ...
HTH,
Keith
Re: Spring Web Flow Examined
I noticed the continuations stuff today as I was working with SWF. Is it possible to define a default flow to use with the continuations code when doing portlets? I don't really want to have to pass in the flow to use in the url, as I may not always have control over it (ie. edit button in a portlet). Passing in a flow is the only way the continuations sample shows.Thanks,
Matt
bestuff.com - the best stuff in the world
Re: Spring Web Flow Examined
When launching a new flow execution, if you don't pass in the _flowId you'll need to configure a controller for each flow definition you want to export at a specific request URL. That's pretty easy to do (see how the Phonebook sample does this), but I'd typically recommend not going that route as webflows are designed to be URL independent.Keith
Re: Spring Web Flow Examined
Keith,Quite interesting. So in that case there are 2 sessions with the same login id. Will it not create big mess?
With that I have a couple of questions:
1. How to integrate 2 webflow scenario when user clicks ctrl-n.
2. For implementation of webflow do I need to integrate with JSF or Strus? Or I pure spring webflow replaces presentation tire responsibilites from Struts or JSF.
Re: Spring Web Flow Examined
Keith,Quite interesting. So in that case there are 2 sessions with the same login id. Will it not create big mess?
With that I have a couple of questions:
1. How to integrate 2 webflow scenario when user clicks ctrl-n.
2. For implementation of webflow do I need to integrate with JSF or Strus? Or I pure spring webflow replaces presentation tire responsibilites from Struts or JSF.
Re: Spring Web Flow Examined
Hi Steven,I have gone through your article, its a greate article.
Its look like to me that spring webflow is lot similar to bea pageflow.
I am thinking of implementing my new application using spring webflow. But my confusion is can I directly use spring webflow without intgration of JSF or struts.
I believe it is a better approach to do the things with 1 technology then the integration of 2-3 technology.
Please provide me your views on this.