问题
I am working with Spring Core 4.0.7 and Spring Web Flow 2.4.0
Using Spring Tool Suite
I am able to create a Spring Web Flow Definition File
For the <flow>
tag it generates
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
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-2.0.xsd">
Observe spring-webflow-2.0.xsd
When I try to use the validation-hints
attribute how the following:
<view-state id="registrar"
view="deportista.flow.formulario.registro"
model="deportista"
validation-hints="'….someValue'" >
The editor put an underline red. So the attribute is wrong or is not valid.
I did realize that If I change:
from
spring-webflow-2.0.xsd
to
spring-webflow.xsd
(-2.0 has been removed)
It is recognized and goes well until I build the application..
In the left part of the <flow>
tag appears a red circle with a x.
If I see the message it says:
Start state is missing. Add at least one state to the flow
Funny because I have in the beginning
<on-start>
<evaluate expression="deportistaAction.createDeportista()"
result-type="com.manuel.jordan.domain.Deportista"
result="flowScope.deportista"/>
</on-start>
<view-state id="registrar"
view="deportista.flow.formulario.registro"
model="deportista"
validation-hints="'…someValue'"
>
Even with that error, the flow process works fine. I mean, the error appears only in the <flow>
definition but when the flow is executed all work fine, practically how if the error never has been generated.
What is wrong? I did a research through Google, and it has been reported how a kind of old bug time ago and it has been already fixed. So wondered why this situation appears again.
来源:https://stackoverflow.com/questions/26222008/webflow-xsd-start-state-is-missing-add-at-least-one-state-to-the-flow