Package de.iritgo.aktera.configuration.preferences

Examples of de.iritgo.aktera.configuration.preferences.PreferencesManager


   * @throws ModelException
   */
  private ListContext createListContext(ModelRequest request, ListingDescriptor listing)
    throws ConfigurationException
  {
    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));
View Full Code Here


          userEnv.clearAttributes();
          userEnv.reset();

          //          DefaultContext dc = (DefaultContext) req.getContext ();
          //          dc.put (UserEnvironment.CONTEXT_KEY, null);
          PreferencesManager preferencesManager = (PreferencesManager) SpringTools
                  .getBean(PreferencesManager.ID);

          preferencesManager.clearCache(uid);
        }
      }
    }
    catch (ContextException e)
    {
View Full Code Here

   * @return
   * @throws ModelException
   */
  private ListContext createListContext(ModelRequest request, ListingDescriptor listing) throws ModelException
  {
    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 = ModelTools.getDerivationPath(request, this);

    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));
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.configuration.preferences.PreferencesManager

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.