Announcement Announcement Module
Collapse
No announcement yet.
Multiaction with result Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiaction with result

    Hello everyone!

    I am using Spring 3.0.1 & Spring webflow 2.0.8. I have the following workflow:

    ###################################
    ...
    <view-state id="catalogue" view="catalogue/catalogue" model="flowScope.searchtable">
    ...
    <transition on="searchTable" to="search" />
    ...
    </view-state>

    <action-state id="search">
    <evaluate expression="catalogueserviceaction.search" result="flowScope.maintable" />
    <transition on="success" to="catalogue" />
    <transition on="error" to="catalogue" />
    </action-state>
    ...
    ###################################

    This is my Multiaction:

    ###################################
    ...
    @Resource
    private CatalogueService catalogueService;

    public Event search(RequestContext context) {
    try {
    String tabelle = (String) context.getCurrentEvent().getAttributes()
    .get("tabelle");
    Table table = catalogueService.getMainTable(tabelle);

    return success(table);
    } catch (EmptyResultDataAccessException e) {
    String errormessage = "Diese Tabellendefinition exisitert nicht";
    context.getMessageContext().addMessage(
    new MessageBuilder().error().defaultText(errormessage)
    .build());

    return error(e);
    } catch (DataAccessException e) {
    return error(e);
    }

    }
    ...
    ###################################

    I get my Object with Data (i still debugged it) and put it into the success method. My problem is that don't see the result flowScope.maintable.

    Any idea?

    Many thanks....


    ~Chris

  • #2
    Use [ code][/code ] tags when posting.

    The result is your event, what would you expect. The result, the value returned from the method is stored. Where do you don't see it, in your pages there is no scope simply use maintable not flowScope.maintable (unless you use JSF).

    Comment

    Working...
    X