From be58f875c5b286077332aeed63b76dbd89c537be Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Tue, 3 Apr 2007 00:15:52 +0000 Subject: [PATCH] added var support in sellitem removed restriction in form action --- .../src/main/webapp/WEB-INF/faces-config.xml | 5 +---- .../sellitem/SellItemPropertyEditorRegistrar.java | 2 +- .../flows/conversation-scope/sellitem-beans.xml | 2 +- .../sellitem-conversation-scope-flow.xml | 13 ++++++------- .../main/webapp/WEB-INF/flows/sellitem-beans.xml | 2 +- .../src/main/webapp/WEB-INF/flows/sellitem-flow.xml | 13 ++++++------- .../src/main/webapp/WEB-INF/flows/shipping-flow.xml | 2 +- .../WEB-INF/flows/simple/sellitem-simple-flow.xml | 13 ++++++------- .../springframework/webflow/action/FormAction.java | 3 +-- 9 files changed, 24 insertions(+), 31 deletions(-) diff --git a/spring-webflow-samples/sellitem-jsf/src/main/webapp/WEB-INF/faces-config.xml b/spring-webflow-samples/sellitem-jsf/src/main/webapp/WEB-INF/faces-config.xml index 95b69676..033c0da0 100644 --- a/spring-webflow-samples/sellitem-jsf/src/main/webapp/WEB-INF/faces-config.xml +++ b/spring-webflow-samples/sellitem-jsf/src/main/webapp/WEB-INF/faces-config.xml @@ -9,11 +9,8 @@ org.springframework.webflow.executor.jsf.FlowNavigationHandler - org.springframework.webflow.executor.jsf.FlowExecutionVariableResolver + org.springframework.webflow.executor.jsf.DelegatingFlowVariableResolver - - org.springframework.webflow.executor.jsf.FlowExecutionPropertyResolver - diff --git a/spring-webflow-samples/sellitem/src/main/java/org/springframework/webflow/samples/sellitem/SellItemPropertyEditorRegistrar.java b/spring-webflow-samples/sellitem/src/main/java/org/springframework/webflow/samples/sellitem/SellItemPropertyEditorRegistrar.java index 7b2e67d2..9ffc7145 100644 --- a/spring-webflow-samples/sellitem/src/main/java/org/springframework/webflow/samples/sellitem/SellItemPropertyEditorRegistrar.java +++ b/spring-webflow-samples/sellitem/src/main/java/org/springframework/webflow/samples/sellitem/SellItemPropertyEditorRegistrar.java @@ -25,6 +25,6 @@ import org.springframework.beans.propertyeditors.CustomDateEditor; public class SellItemPropertyEditorRegistrar implements PropertyEditorRegistrar { public void registerCustomEditors(PropertyEditorRegistry registry) { - registry.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"), true)); + registry.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("dd/MM/yyyy"), true)); } } diff --git a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-beans.xml b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-beans.xml index aa7bd74a..34d8cf45 100644 --- a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-beans.xml +++ b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-beans.xml @@ -5,7 +5,7 @@ - + diff --git a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-conversation-scope-flow.xml b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-conversation-scope-flow.xml index b6850a3f..ceec848c 100644 --- a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-conversation-scope-flow.xml +++ b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/conversation-scope/sellitem-conversation-scope-flow.xml @@ -3,15 +3,15 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd"> - - - - - + + - + + + + @@ -44,7 +44,6 @@ - diff --git a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-beans.xml b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-beans.xml index 2b828373..03ae3ec1 100644 --- a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-beans.xml +++ b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-beans.xml @@ -5,7 +5,7 @@ - + diff --git a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-flow.xml b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-flow.xml index a49fb3d2..27a330cb 100644 --- a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-flow.xml +++ b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/sellitem-flow.xml @@ -3,15 +3,15 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd"> - - - - - + + - + + + + @@ -49,7 +49,6 @@ - diff --git a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/shipping-flow.xml b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/shipping-flow.xml index 9bf52e40..f549b279 100644 --- a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/shipping-flow.xml +++ b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/shipping-flow.xml @@ -10,7 +10,7 @@ - + diff --git a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/simple/sellitem-simple-flow.xml b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/simple/sellitem-simple-flow.xml index 8c06eaa1..a8af8da0 100644 --- a/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/simple/sellitem-simple-flow.xml +++ b/spring-webflow-samples/sellitem/src/main/webapp/WEB-INF/flows/simple/sellitem-simple-flow.xml @@ -4,14 +4,14 @@ xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd"> - - - - - + + - + + + + @@ -46,7 +46,6 @@ - diff --git a/spring-webflow/src/main/java/org/springframework/webflow/action/FormAction.java b/spring-webflow/src/main/java/org/springframework/webflow/action/FormAction.java index bf49588c..0e8d3790 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/action/FormAction.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/action/FormAction.java @@ -494,8 +494,7 @@ public class FormAction extends MultiAction implements InitializingBean { protected void initAction() { if (getValidator() != null) { - Assert.notNull(getFormObjectClass(), "When using a validator, the form object class is required"); - if (!getValidator().supports(getFormObjectClass())) { + if (getFormObjectClass() != null && !getValidator().supports(getFormObjectClass())) { throw new IllegalArgumentException("Validator [" + getValidator() + "] does not support form object class [" + getFormObjectClass() + "]"); }