|
From: Keith D. <ke...@in...> - 2005-05-18 03:04:13
|
A few additional comments:
On #1 below we could have simple view setup action support as follows:
<view-state id="displaySearchCriteria" view="searchCriteria">
<action bean="phonebookActions" method="setupSearchCriteriaForm"/>
</view-state>
That would of course assume there was only a 'success' action result
possibility, which seems appropriate for most setup actions (e.g to populate
reference data drop downs) If you need to handle error cases, then you'd
need to use the display-criteria elemtn with a if-false attribute.
One other feature I forgot to mention is the new ViewDescriptorCreator
strategy, allowing full dynamic control over the selection of a view and all
supporting model data when a view state is rendered. This is a powerful
thing, for use like:
<view-state id="myViewState" view="myStaticView"/>
<view-state id="myViewState"
view-creator="samples.MyCustomViewDescriptorCreator"/>
<view-state id="myViewState"
redirect="myRedirectView?foo=${flowScope.foo}"/>
The first definition uses a SimpleViewDescriptorCreator that simply selects
the same view each time. The second definition selects a custom
ViewDescriptorCreator implementation (the most flexible). The third
leverages a RedirectViewDescriptorCreator capable of resolving redirect
parameters from the flow request context using something like OGNL
expressions.
Keith
_____
From: Keith Donald [mailto:ke...@in...]
Sent: Tuesday, May 17, 2005 9:17 PM
To: 'spr...@li...'
Subject: spring webflow in progress pr3 features - seeking feedback
SWF PR3 is expected to add some significant new features. Some of these are
still in progress, but we want to get them out now for feedback. want to
make sure these are right.
Here they are:
1. view state "display criteria" - EXPERIMENTAL
We are experimenting with display TransitionCriteria associatable with a
ViewState, to be tested after the state is entered but before a view
descriptor is returned for resolution and rendering. This allows you to
execute arbitrary view pre-render logic before the view is displayed,
reducing the need for an explicit action state to execute such logic. In
addition, if the display criteria test fails, a transition to another state
(like an error state) may be executed.
This is realized in its simplest form in the DTD as follows:
<view-state id="displaySearchCriteria" view="searchCriteria">
<display-criteria if-false="myErrorState">
<action bean="phonebookActions" method="setupSearchCriteriaForm"/>
</display-criteria>
</view-state>
It could get as involved as:
<view-state id="displaySearchCriteria" view="searchCriteria">
<display-criteria if-false="myErrorState">
<action-criteria true="customTrueEventId" false="customFalseEventId">
<action bean="phonebookActions"
method="setupSearchCriteriaForm"/>
<action bean="phonebookActions"
method="setupSearchCriteriaFormSecondActionMethod"/>
</action-criteria>
</display-criteria>
</view-state>
2. annotated objects: flows, states, transitions, actions - NEARLY DONE
All definition objects (instances of Flow, State, Transition, Action) can
now be qualified (aka annotated) with properties - metadata. This should
open the door for all kinds of stuff from role-based state security checks
to dynamic state decision logic based on transitional context. We're also
adding full support for from-string property type conversion (with type
aliasing) using the new data binding infrastructure.
This is realized in the xml definition as follows:
<flow || state || action || transition>
<property name="foo" value="12345" type="int"/>
<property name="bar" value="some_custom_type"
type="myCustomTypeAlias"/>
<property name="foo2" value="some_other_custom_type"
type="com.mycompany.MyFullyQualifiedType"/>
</.>
This relies on a converter installed to convert from string to the target
type, with optional type aliasing to reduce typing.
3. attribute mapping from xml flow definition - NEARLY DONE
It's now possible to specify input/output mappings for subflows directly
from within the xml definition, reducing the need to instantiate a custom
attribute mapper instance.
This realized in multiple ways as follows:
<subflow-state id="enterPassengerInformation" flow="passenger">
<attribute-mapper>
<input name="someInputAttributeName"/>
<input name="someOtherInputAttributeName"
as="someAdaptedInputAttributeName"/>
<input value="${requestScope.someAttribute}" source-type="string"
as="someAdaptedInputAttributeName" target-type="int"/>
<output name="someOutputAttributeName"/>
<output name="someOutputAttributeName"
as="someAdaptedOutputAttributeName"/>
.
</attribute-mapper>
</subflow-state>
4. flow loaders - EXPERIMENTAL
There's really no benefit I see to have Flows exported in the web
application context. A FlowAssembler could easily accept a group of flow
builder classnames and/or references to XML flow definition resources and
produce fully-configured Flow instances locatable by a FlowLocator. This
would eliminate the need to define a FlowFactoryBean per Flow definition:
you could define all the flows of your app in a single bean definition, e.g:
<bean id="flowLoader"
class="org.springframework.web.flow.config.FlowLoader"/>
<property name="locations">
<list>
<value>classpath:myflow.xml</value>
<value>classpath:flows/*.xml</value>
</list>
<property name="classes">
<list>
<value>com.mycompany.MyFlowBuilder</value>
</list>
</property>
</bean>
What do you think? Note the data binding stuff is completely independent of
webflow and really belongs as an enhancement to the core in future Spring
releases.
Keith
|
|
From: <mic...@as...> - 2005-05-18 09:34:47
|
>=20 > Message: 1 > From: "Keith Donald" <ke...@in...> > To: <spr...@li...> > Date: Tue, 17 May 2005 23:02:38 -0400 > Subject: [Springframework-developer] RE: spring webflow in=20 > progress pr3 features - seeking feedback ... > A few additional comments: >=20 >=20 > On #1 below we could have simple view setup action support as follows: >=20 > <view-state id=3D"displaySearchCriteria" view=3D"searchCriteria"> >=20 > <action bean=3D"phonebookActions" method=3D"setupSearchCriteriaForm"/> >=20 > </view-state> >=20 > That would of course assume there was only a 'success' action=20 > result possibility, which seems appropriate for most setup=20 > actions (e.g to populate reference data drop downs) If you=20 > need to handle error cases, then you'd need to use the=20 > display-criteria elemtn with a if-false attribute. >=20 > =20 IMHO this could be better achieved by centralized error handling = specific for flow - or inherited from parent flow. This feature is still = missing and I assume that it could solve many error handling situations. = I proposed this requirement on user-list as well as on forum and the = idea was to involve similar error handling mechanism to one in Spring = Web. The base difference would be only in mapping exception/error to = certain view in flow instead of view id to be used by SpringWeb = ViewResolver. This solution is not complex yet, but could be easily designed to = elegant and plugable solution of centralized flow error handling.=20 Thank you, Michal Links to my previous posts: http://sourceforge.net/mailarchive/message.php?msg_id=3D11479934 http://forum.springframework.org/viewtopic.php?t=3D4881&highlight=3D |
|
From: Lachezar D. <l.d...@gm...> - 2005-05-18 08:13:43
|
Well...
Do you need to do this:
> <view-state id=3D"myViewState"
> redirect=3D"myRedirectView?foo=3D${flowScope.foo}"/>=20
Currently I have done:
<end-state id=3D"normalEndGoBackToBeginning" view=3D"redirect:/home.do" /=
>
|
|
From: Keith D. <ke...@in...> - 2005-05-18 10:42:58
|
Right, the redirect attribute would be there as a convenience to having =
to
parse string prefixes using the 'view' attribute.
Keith
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
Lachezar Dobrev
Sent: Wednesday, May 18, 2005 4:14 AM
To: spr...@li...
Subject: Re: [Springframework-developer] RE: spring webflow in progress =
pr3
features - seeking feedback
Well...
Do you need to do this:
> <view-state id=3D"myViewState"
> redirect=3D"myRedirectView?foo=3D${flowScope.foo}"/>=20
Currently I have done:
<end-state id=3D"normalEndGoBackToBeginning" =
view=3D"redirect:/home.do" />
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id=16344&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Scott B. <sco...@ru...> - 2005-05-18 12:19:57
|
Would that <view-state id="myViewState"
redirect="myRedirectView?foo=${flowScope.foo}" /> be able to handle
something like
<view-state id="myViewState" redirect="${flowScope.redirectUrl}" />
i.e. redirect to a URL provided to it rather than a known redirect URL?
Thanks
-Scott
Scott Battaglia
Application Developer, Architecture & Engineering Team
Enterprise Systems and Services, Rutgers University
v: 732.445.0097 | f: 732.445.5493 | sco...@ru...
Keith Donald wrote:
>Right, the redirect attribute would be there as a convenience to having to
>parse string prefixes using the 'view' attribute.
>
>Keith
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On Behalf Of
>Lachezar Dobrev
>Sent: Wednesday, May 18, 2005 4:14 AM
>To: spr...@li...
>Subject: Re: [Springframework-developer] RE: spring webflow in progress pr3
>features - seeking feedback
>
> Well...
> Do you need to do this:
>
>
>
>> <view-state id="myViewState"
>>redirect="myRedirectView?foo=${flowScope.foo}"/>
>>
>>
>
> Currently I have done:
> <end-state id="normalEndGoBackToBeginning" view="redirect:/home.do" />
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Oracle Space Sweepstakes
>Want to be the first software developer in space?
>Enter now for the Oracle Space Sweepstakes!
>http://ads.osdn.com/?ad_idt12&alloc_id344&op=ick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Oracle Space Sweepstakes
>Want to be the first software developer in space?
>Enter now for the Oracle Space Sweepstakes!
>http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
|
|
From: Keith D. <ke...@in...> - 2005-05-18 15:14:21
|
Yes that will work.
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
Scott Battaglia
Sent: Wednesday, May 18, 2005 8:20 AM
To: spr...@li...
Subject: Re: [Springframework-developer] RE: spring webflow in progress =
pr3
features - seeking feedback
Would that <view-state id=3D"myViewState"=20
redirect=3D"myRedirectView?foo=3D${flowScope.foo}" /> be able to handle=20
something like
<view-state id=3D"myViewState" redirect=3D"${flowScope.redirectUrl}" />
i.e. redirect to a URL provided to it rather than a known redirect URL?
Thanks
-Scott
Scott Battaglia
Application Developer, Architecture & Engineering Team
Enterprise Systems and Services, Rutgers University
v: 732.445.0097 | f: 732.445.5493 | sco...@ru...
Keith Donald wrote:
>Right, the redirect attribute would be there as a convenience to having =
to
>parse string prefixes using the 'view' attribute.
>
>Keith
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On =
Behalf Of
>Lachezar Dobrev
>Sent: Wednesday, May 18, 2005 4:14 AM
>To: spr...@li...
>Subject: Re: [Springframework-developer] RE: spring webflow in progress =
pr3
>features - seeking feedback
>
> Well...
> Do you need to do this:
>
> =20
>
>> <view-state id=3D"myViewState"
>>redirect=3D"myRedirectView?foo=3D${flowScope.foo}"/>=20
>> =20
>>
>
> Currently I have done:
> <end-state id=3D"normalEndGoBackToBeginning" =
view=3D"redirect:/home.do" />
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Oracle Space Sweepstakes
>Want to be the first software developer in space?
>Enter now for the Oracle Space Sweepstakes!
>http://ads.osdn.com/?ad_idt12&alloc_id=16344&op=3Dick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Oracle Space Sweepstakes
>Want to be the first software developer in space?
>Enter now for the Oracle Space Sweepstakes!
>http://ads.osdn.com/?ad_idt12&alloc_id=16344&op=3Dclick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
> =20
>
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=3D7412&alloc_id=3D16344&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Erwin V. <erw...@er...> - 2005-05-18 08:20:40
|
Regarding the view state: with named entry actions we could have =
everything without even doing stuff like the "display-criteria" with =
"if-false" and stuff like that. See my earlier mail.
Erwin Vervaet
erw...@er...
----- Original Message -----=20
From: Keith Donald=20
To: spr...@li...=20
Sent: Wednesday, May 18, 2005 5:02 AM
Subject: [Springframework-developer] RE: spring webflow in progress =
pr3 features - seeking feedback
A few additional comments:
=20
On #1 below we could have simple view setup action support as follows:
=20
<view-state id=3D"displaySearchCriteria" view=3D"searchCriteria">
<action bean=3D"phonebookActions" method=3D"setupSearchCriteriaForm"/>
</view-state>
=20
That would of course assume there was only a 'success' action result =
possibility, which seems appropriate for most setup actions (e.g to =
populate reference data drop downs) If you need to handle error cases, =
then you'd need to use the display-criteria elemtn with a if-false =
attribute.
=20
One other feature I forgot to mention is the new ViewDescriptorCreator =
strategy, allowing full dynamic control over the selection of a view and =
all supporting model data when a view state is rendered. This is a =
powerful thing, for use like:
=20
<view-state id=3D"myViewState" view=3D"myStaticView"/>=20
<view-state id=3D"myViewState" =
view-creator=3D"samples.MyCustomViewDescriptorCreator"/>=20
<view-state id=3D"myViewState" =
redirect=3D"myRedirectView?foo=3D${flowScope.foo}"/>
=20
The first definition uses a SimpleViewDescriptorCreator that simply =
selects the same view each time. The second definition selects a custom =
ViewDescriptorCreator implementation (the most flexible). The third =
leverages a RedirectViewDescriptorCreator capable of resolving redirect =
parameters from the flow request context using something like OGNL =
expressions.
=20
Keith
=20
-------------------------------------------------------------------------=
-----
From: Keith Donald [mailto:ke...@in...]=20
Sent: Tuesday, May 17, 2005 9:17 PM
To: 'spr...@li...'
Subject: spring webflow in progress pr3 features - seeking feedback
=20
SWF PR3 is expected to add some significant new features. Some of =
these are still in progress, but we want to get them out now for =
feedback. want to make sure these are right.
=20
Here they are:
=20
1.. view state "display criteria" - EXPERIMENTAL=20
=20
We are experimenting with display TransitionCriteria associatable with =
a ViewState, to be tested after the state is entered but before a view =
descriptor is returned for resolution and rendering. This allows you to =
execute arbitrary view pre-render logic before the view is displayed, =
reducing the need for an explicit action state to execute such logic. =
In addition, if the display criteria test fails, a transition to another =
state (like an error state) may be executed.
=20
This is realized in its simplest form in the DTD as follows:
=20
<view-state id=3D"displaySearchCriteria" view=3D"searchCriteria">
<display-criteria if-false=3D"myErrorState">
<action bean=3D"phonebookActions" =
method=3D"setupSearchCriteriaForm"/>
</display-criteria>
</view-state>
=20
It could get as involved as:
=20
<view-state id=3D"displaySearchCriteria" view=3D"searchCriteria">
<display-criteria if-false=3D"myErrorState">
<action-criteria true=3D"customTrueEventId" =
false=3D"customFalseEventId">
<action bean=3D"phonebookActions" =
method=3D"setupSearchCriteriaForm"/>
<action bean=3D"phonebookActions" =
method=3D"setupSearchCriteriaFormSecondActionMethod"/>
</action-criteria>
</display-criteria>
</view-state>
=20
2.. annotated objects: flows, states, transitions, actions - NEARLY =
DONE=20
=20
All definition objects (instances of Flow, State, Transition, Action) =
can now be qualified (aka annotated) with properties - metadata. This =
should open the door for all kinds of stuff from role-based state =
security checks to dynamic state decision logic based on transitional =
context. We're also adding full support for from-string property type =
conversion (with type aliasing) using the new data binding =
infrastructure.
=20
This is realized in the xml definition as follows:
=20
<flow || state || action || transition>
<property name=3D"foo" value=3D"12345" type=3D"int"/>
<property name=3D"bar" value=3D"some_custom_type" =
type=3D"myCustomTypeAlias"/>
<property name=3D"foo2" value=3D"some_other_custom_type" =
type=3D"com.mycompany.MyFullyQualifiedType"/>=20
</.>
=20
This relies on a converter installed to convert from string to the =
target type, with optional type aliasing to reduce typing.
=20
3.. attribute mapping from xml flow definition - NEARLY DONE=20
=20
It's now possible to specify input/output mappings for subflows =
directly from within the xml definition, reducing the need to =
instantiate a custom attribute mapper instance.
=20
This realized in multiple ways as follows:
=20
<subflow-state id=3D"enterPassengerInformation" flow=3D"passenger">=20
<attribute-mapper>=20
<input name=3D"someInputAttributeName"/>
<input name=3D"someOtherInputAttributeName" =
as=3D"someAdaptedInputAttributeName"/>=20
<input value=3D"${requestScope.someAttribute}" =
source-type=3D"string" as=3D"someAdaptedInputAttributeName" =
target-type=3D"int"/>=20
<output name=3D"someOutputAttributeName"/>=20
<output name=3D"someOutputAttributeName" =
as=3D"someAdaptedOutputAttributeName"/>
.
</attribute-mapper>=20
</subflow-state>
=20
=20
4.. flow loaders - EXPERIMENTAL=20
=20
There's really no benefit I see to have Flows exported in the web =
application context. A FlowAssembler could easily accept a group of =
flow builder classnames and/or references to XML flow definition =
resources and produce fully-configured Flow instances locatable by a =
FlowLocator. This would eliminate the need to define a FlowFactoryBean =
per Flow definition: you could define all the flows of your app in a =
single bean definition, e.g:
=20
<bean id=3D"flowLoader" =
class=3D"org.springframework.web.flow.config.FlowLoader"/>
<property name=3D"locations">
<list>
<value>classpath:myflow.xml</value>
<value>classpath:flows/*.xml</value>
</list>
<property name=3D"classes">
<list>
<value>com.mycompany.MyFlowBuilder</value>
</list>
</property>
</bean>
=20
What do you think? Note the data binding stuff is completely =
independent of webflow and really belongs as an enhancement to the core =
in future Spring releases.
=20
Keith=20
|