5

I am playing around with Spring-Webflow (2.3), ZK (5.0.7.1) and ZK Spring (3.0).

Actually I'm trying to signal an event with a HTML link as described at Spring-Webflow.

<a href="${flowExecutionUrl}&_eventId=go2ProjectRoomView" >2 Project</a>

Part of my flow definition file looks like:

<view-state id="mainView">
  <transition on="go2ProjectRoomView" to="projectRoomView" bind="false"/>
</view-state>

<view-state id="projectRoomView">
  <transition on="go2MainView" to="mainView" bind="false"/>
</view-state>

If I deploy my web project and navigate to the main view following error appears:

The reference to entity "_eventId" must end with the ';' delimiter

Same error happens if I replace _eventId=go2ProjectRoomView by _eventId_go2ProjectRoomView.

Link to full stack trace.

Sean Vieira
  • 155,703
  • 32
  • 311
  • 293

1 Answers1

7

The error you are receiving is actually an HTML/XML parsing error. Ampersand (&) is used to reference special characters/entities (see here). Change your link to:

<a href="${flowExecutionUrl}&amp;_eventId=go2ProjectRoomView" >2 Project</a>

and you should be ok.

David
  • 1,481
  • 11
  • 19
  • Thanks for your help. The error i mentioned doesn't appear anymore. Unfortunately the next view state connected to the thrown event will not be displayed. :-( – Christian Wenz Aug 29 '11 at 14:38
  • From the code you posted, you do not have the view attribute defined for either of your view-states. You need to specify this so WebFlow knows what view it should render when it enters that particular state. – David Aug 29 '11 at 14:50
  • If no view name is defined spring assumes the id as the view name. But I tried it nevertheless and it doesn't help. The view will be rendered if i write the following: – Christian Wenz Aug 29 '11 at 19:16
  • You are right, I was not aware of this shortcut for the view name. You might consider posting a new question with more information about the new problem you are having. – David Aug 29 '11 at 21:02