views:

195

answers:

1

Basically I want to add a # to the end of the flow execution key

e.g. _flowExecutionKey=_c8CEAE6.....E1095#

so that when the page displays it will display at the anchor tag

I have a page which is built dynamically by the user.

The user can choose to add additional fields to the page to enter more data.

The fields are an object which is stored in a list.

The page loops over all objects in the list and displays them.

I have configured an action flow that adds another object to the list and then displays the page again which causes the new fields to appear.

The problem is that when the page loads again it is always at the top and not where the new field was added. I can add an anchor to where the new fields are generated but I don't know if its possible to add a # to the end of the flow execution key

+1  A: 

A bit of a longshot, but I think the solution for this is probably through a combination of steps, and not so much through spring web-flow mechanisms

  • set the index of the last object edited in viewScope
  • in your jsp's, put the local anchors, say object0 to object20
  • have a bit of javascript, that 'onload' changes the location to the right anchor:

    body onload="location.href = location.href + '#object8'"

This would take you to the 8th element, without hitting the server again.

Hans Westerbeek
Using the above method I was able to solve my problem, thanks!
Craig Angus
nice:) so i think you should mark your question as 'answered'
Hans Westerbeek