Tuesday, November 23, 2010

Spring Webflow and JSF: strange behaviour when triggering action which name is "back"

I used action named "back" which triggered transition to end-state:

View:

<h:commandbutton id="back" value="#{relLabels.back_btn}" action="back">
</h:commandbutton>

Flow chunk:

...
<transition on="back" to="return-back"/>
</view-state>
<end-state id="return-back" />

When I click this button the following exception occurs:

Exception thrown in state 'return-back' of flow 'entity-type-process-type-relationship-flow'; nested exception is java.util.NoSuchElementException

Caused by:
java.util.NoSuchElementException - Exception thrown in state 'return-back' of flow 'entity-type-process-type-relationship-flow'; nested exception is java.util.NoSuchElementException

When I change action name to something else, for example "return-back" - it works OK, without exceptions. Very strange.

Spring Webflow version: 2.0-m1
JSF: MyFaces 1.2.7

2 comments:

Unknown said...

most likely it was because we have a global transition with the same name in some parent flow :)

Unknown said...

most likely it was because we have a global transition with the same name in some parent flow :)