Announcement Announcement Module
No announcement yet.
Troubles calling the same View State Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Troubles calling the same View State

    Hi all,

    I donít know if someone can help me out with this issue

    I'm working with spring web flow and in a specific transaction I'm calling the same view state several times, as you can see below in Web flow Code .

    If I click on submit I call the controller and saveLineSale, but I can save more than one line, so if I click on submit again I call saveLineSale and so on.

    Web flow Code

    <?xml version="1.0" encoding="UTF-8"?>
    <flow xmlns=""
            <evaluate expression="controller.getBean(flowRequestContext)" result=""/>
        <view-state id="new" view="sale/newSale" model="sale">
            <transition on="submit" to="new">
                <evaluate expression="controller.saveLineSale(flowRequestContext, sale)"/>
            <transition on="deleteLine" to="new">
                <evaluate expression="controller.deleteLine(flowRequestContext, sale)"/>
            <transition on="finish" to="result">
                <evaluate expression="controller.sendMail(flowRequestContext)"/>
        <end-state id="result" view="result">
                <evaluate expression="controller.result(flowRequestContext,"/>
    Controller Code
     public Boolean saveLineSale(RequestContext context, Bean bean) {
      // save the bean;
      // retreive all bean previuly saved
      List<Bean> list = loadAllBean();
      //  put them in flow to list
      context.getFlowScope().put("listBean", list);
      return true;
    The problem is that It only works for 3 time, yes, it sounds crazy but It save the first line and the second one but the third time that I click on submit it stay in the same page like when click F5.... It never hit the controller again...

    Anyone can help me pleas

  • #2
    What does your view look like?