Search in sources :

Example 1 with RoomAndDropdown

use of org.finos.symphony.toolkit.workflow.fixture.RoomAndDropdown in project spring-bot by finos.

the class RoomAndDropdownMessageML method dropdownsWork.

protected WorkResponse dropdownsWork(WorkMode wm) {
    SymphonyRoom theRoom = new SymphonyRoom("tesxt room", "abc123");
    String strangeOption = "a";
    RoomAndDropdown to4 = new RoomAndDropdown(theRoom, strangeOption);
    Button submit = new Button("submit", Type.ACTION, "GO");
    WorkResponse wr = new WorkResponse(theRoom, to4, wm);
    // ensure buttons
    ButtonList bl = (ButtonList) wr.getData().get(ButtonList.KEY);
    bl.add(submit);
    // ensure rooms
    wr.getData().put("rooms", getSomeRooms());
    // ensure dynamic dropdown options
    wr.getData().put("dynoptions", getDynamicOptions());
    return wr;
}
Also used : Button(org.finos.symphony.toolkit.workflow.form.Button) RoomAndDropdown(org.finos.symphony.toolkit.workflow.fixture.RoomAndDropdown) WorkResponse(org.finos.symphony.toolkit.workflow.response.WorkResponse) ButtonList(org.finos.symphony.toolkit.workflow.form.ButtonList) SymphonyRoom(org.finos.symphony.toolkit.workflow.sources.symphony.content.SymphonyRoom)

Aggregations

RoomAndDropdown (org.finos.symphony.toolkit.workflow.fixture.RoomAndDropdown)1 Button (org.finos.symphony.toolkit.workflow.form.Button)1 ButtonList (org.finos.symphony.toolkit.workflow.form.ButtonList)1 WorkResponse (org.finos.symphony.toolkit.workflow.response.WorkResponse)1 SymphonyRoom (org.finos.symphony.toolkit.workflow.sources.symphony.content.SymphonyRoom)1