HTMLState overview = new HTMLState("Overview", list, true, null);
HTMLState drillDown = new HTMLState("DrillDown", null, true, TEMPLATE_DrillDown);
HTMLState newItem = new HTMLState("NewItem", list.getSelected(), true, TEMPLATE_NewItem);
return new HTMLTransition[]{
new HTMLTransition(overview, HTMLFunction.EVENT_POPUP, drillDown),
new HTMLTransition(overview, EVENT_reload, new ReloadCommand(), overview),
new HTMLTransition(overview, "deleteItemCommand", new DeleteCommand(), overview),
new HTMLTransition(overview, "sort", new SortItemsCommand(), overview),
new HTMLTransition(drillDown, HTMLFunction.EVENT_OK, new UpdateCommand(), overview),
new HTMLTransition(drillDown, HTMLFunction.EVENT_CANCEL, overview),
new HTMLTransition(overview, "newItemCommand", newItem),
new HTMLTransition(newItem, HTMLFunction.EVENT_OK, new NewCommand(), overview),
new HTMLTransition(newItem, HTMLFunction.EVENT_CANCEL, overview),
new HTMLTransition("toggleDebug", new ToggleDebugCommand()),
};
}