Search in sources :

Example 6 with TabElementContainer

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

the class HtmlUiBuilder method newDataTableHandler.

public Object newDataTableHandler(final HttpServletRequest request, final String pageName, final Map<String, Object> parameters, final Callable<Collection<? extends Object>> rowsCallable) {
    parameters.put("serverSide", false);
    if (isDataTableCallback(request)) {
        try {
            final Collection<? extends Object> rows = rowsCallable.call();
            return newDataTableMap(request, rows, pageName);
        } catch (final Exception e) {
            throw new RuntimeException("Unable to get rows", e);
        }
    } else {
        final TabElementContainer tabs = new TabElementContainer();
        addTabDataTable(tabs, this, pageName, parameters);
        return tabs;
    }
}
Also used : TabElementContainer(com.revolsys.ui.html.view.TabElementContainer) ServletException(javax.servlet.ServletException) PageNotFoundException(com.revolsys.ui.web.exception.PageNotFoundException) IOException(java.io.IOException)

Example 7 with TabElementContainer

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

the class RecordHtmlUiBuilder method newDataTableHandler.

public Object newDataTableHandler(final HttpServletRequest request, final String pageName, final Map<String, Object> parameters) {
    if (isDataTableCallback(request)) {
        return newDataTableMap(request, pageName, parameters);
    } else {
        final TabElementContainer tabs = new TabElementContainer();
        addTabDataTable(tabs, this, pageName, parameters);
        return tabs;
    }
}
Also used : TabElementContainer(com.revolsys.ui.html.view.TabElementContainer)

Aggregations

TabElementContainer (com.revolsys.ui.html.view.TabElementContainer)7 ElementContainer (com.revolsys.ui.html.view.ElementContainer)4 HttpServletRequest (javax.servlet.http.HttpServletRequest)4 ButtonsToolbarElement (com.revolsys.ui.html.view.ButtonsToolbarElement)3 Menu (com.revolsys.ui.model.Menu)3 Page (com.revolsys.ui.web.config.Page)3 PageNotFoundException (com.revolsys.ui.web.exception.PageNotFoundException)3 Form (com.revolsys.ui.html.form.Form)2 HtmlUiBuilderObjectForm (com.revolsys.ui.html.form.HtmlUiBuilderObjectForm)2 UiBuilderObjectForm (com.revolsys.ui.html.form.UiBuilderObjectForm)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 LinkedHashMap (java.util.LinkedHashMap)2 KeySerializer (com.revolsys.ui.html.serializer.key.KeySerializer)1 Element (com.revolsys.ui.html.view.Element)1 IOException (java.io.IOException)1 ServletException (javax.servlet.ServletException)1