Search in sources :

Example 1 with MenuElement

use of com.revolsys.ui.html.view.MenuElement in project com.revolsys.open by revolsys.

the class MenuViewController method menu.

@RequestMapping("/view/menu/{menuName}")
public void menu(final HttpServletRequest request, final HttpServletResponse response, @PathVariable("menuName") final String menuName) throws IOException {
    final Menu menu = (Menu) request.getAttribute(menuName);
    if (menu != null) {
        final MenuElement menuElement = new MenuElement(menu, menuName);
        final OutputStream out = response.getOutputStream();
        menuElement.serialize(out);
    }
}
Also used : OutputStream(java.io.OutputStream) Menu(com.revolsys.ui.model.Menu) MenuElement(com.revolsys.ui.html.view.MenuElement) RequestMapping(com.revolsys.ui.web.annotation.RequestMapping)

Aggregations

MenuElement (com.revolsys.ui.html.view.MenuElement)1 Menu (com.revolsys.ui.model.Menu)1 RequestMapping (com.revolsys.ui.web.annotation.RequestMapping)1 OutputStream (java.io.OutputStream)1