Package de.iritgo.aktera.ui.listing

Examples of de.iritgo.aktera.ui.listing.ListContext


      if (currentSearchCategory != null)
      {
        listing.setCategory(currentSearchCategory);
      }

      ListContext context = createListContext(wrappedRequest, listing);

      handler.adjustListing(wrappedRequest, listing, context);

      ListFiller filler = handler.createListing(wrappedRequest, listing, handler, context);
View Full Code Here


  {
    PreferencesManager preferencesManager = (PreferencesManager) SpringTools.getBean(PreferencesManager.ID);
    String currentUserName = UserTools.getCurrentUserName(request);
    Integer currentUserId = UserTools.getCurrentUserId(request);

    ListContext context = new ListContext();

    context.setRequest(request);
    context.setListing(listing);
    context.setUserName(currentUserName);
    context.setUserEnvironment(UserTools.getUserEnvironment(request));

    java.util.List configPath = getDerivationPath();

    if (request.getParameter("recordsPerPage") != null)
    {
      int prefRows = preferencesManager.getInt(currentUserId, "gui", "tableRowsPerPage", 15);

      context.setResultsPerPage(NumberTools.toInt(request.getParameterAsString("recordsPerPage"), prefRows));
    }
    else
    {
      int prefRecordsPerPage = preferencesManager.getInt(currentUserId, "gui", "tableRowsPerPage", 15);

      context.setResultsPerPage(ModelTools.getConfigInt(configPath, "recordsPerPage", prefRecordsPerPage));
    }

    context.setNumPrevPages(ModelTools.getConfigInt(configPath, "numPrevPages", 4));
    context.setNumNextPages(ModelTools.getConfigInt(configPath, "numNextPages", 4));
    context.setListName(request.getParameterAsString("listId"));

    if (StringTools.isEmpty(context.getListName()))
    {
      context.setListName(ModelTools.getConfigString(configPath, "listId", "list"));
    }

    context.setDescribe(NumberTools.toBool(request.getParameterAsString("describe"), false));
    context.setPage(listing.getPage());
    context.setFirstResult((context.getPage() - 1) * context.getResultsPerPage());

    return context;
  }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.ui.listing.ListContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.