State Level Multiple Inheritance [SWF-1682]
Johannes Grimm opened SWF-1682 and commented
Currently Spring Web Flow supports multiple inheritance only on a flow level:
<?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"
parent="parent-a,parent-b">
...
</flow>
Inheritance for states only supports single inheritance:
<flow>
<view-state id="viewExample" parent="parent-flow#viewExample" />
</flow>
I would like to propose a patch that enables multiple inheritance for states to enable flow definitions like the following:
<flow>
<view-state id="viewExample" parent="parent-a-flow#viewExample,parent-b-flow#viewExample" />
</flow>
I attached a minimal but complete example as [^state-multi-inheritance.zip]. The project already contains the required patches for spring web flow which are attached as [^patch.diff]. The modifications also handle special cases if a flow is inherited multiple times like given in the following example:
-
example-flow#stateinherits fromparent-a#stateandparent-b#state -
parent-a#stateinherits fromparent-c#state -
parent-b#stateinherits fromparent-c#state
example-flow#state inherits parent-c#state two times but in the flow model the additions from parent-c#state should occur only once.
Affects: 2.4.2
Attachments:
- patch.diff (9.02 kB)
- state-multi-inheritance.zip (13.48 kB)
Rossen Stoyanchev commented
From a brief look the key concern I have is that view-state has a number of attributes and those cannot be reconciled in case of differences. The classical problem with multiple inheritance.