Package org.apache.velocity.tools.view.context

Examples of org.apache.velocity.tools.view.context.ViewContext


  private static final UserAPI userAPI = APILocator.getUserAPI();
  Context ctx;
  private HttpServletRequest request;
 
  public void init(Object obj) {
    ViewContext context = (ViewContext) obj;
    ctx = context.getVelocityContext();
    this.request = context.getRequest();
  }
View Full Code Here


 
    private HttpServletRequest request;
  private LanguageAPI langAPI = APILocator.getLanguageAPI();

    public void init(Object obj) {
        ViewContext context = (ViewContext) obj;
        this.request = context.getRequest();

    }
View Full Code Here

  private LanguageAPI langAPI = APILocator.getLanguageAPI();
  private static int MAX_LIMIT = 100;

  // private HttpServletRequest request;
  public void init(Object obj) {
    ViewContext context = (ViewContext) obj;
    this.request = context.getRequest();
    userAPI = WebAPILocator.getUserWebAPI();
    perAPI = APILocator.getPermissionAPI();
    try {
      user = userAPI.getLoggedInFrontendUser(request);
      backuser = userAPI.getLoggedInUser(request);
View Full Code Here

  protected UserWebAPI userWebAPI;
  public void init(Object obj) {
    if(!Config.getBooleanProperty("ENABLE_SCRIPTING", false)){
      return;
    }
    ViewContext context = (ViewContext) obj;
   
    this.request = context.getRequest();
    ctx = context.getVelocityContext();   
    try {
      host = WebAPILocator.getHostWebAPI().getCurrentHost(request);
    } catch (PortalException e1) {
      Logger.error(this,e1.getMessage(),e1);
    } catch (SystemException e1) {
View Full Code Here

public class TagsWebAPI implements ViewTool {
  private HttpServletRequest request;
  Context ctx;

  public void init(Object obj) {
    ViewContext context = (ViewContext) obj;
    this.request = context.getRequest();
    ctx = context.getVelocityContext();
  }
View Full Code Here

   * @param  obj  the ViewContext that is automatically passed on view tool initialization, either in the request or the application
   * @return     
   * @see         ViewTool, ViewContext
   */
  public void init(Object obj) {
    ViewContext context = (ViewContext) obj;
    request = context.getRequest();
    ctx = context.getVelocityContext();
  }
View Full Code Here

        }
    }
   
    @Override
    public void init(Object initData) {
        ViewContext context = (ViewContext) initData;
        try {
        this.request = context.getRequest();
            currenthost=WebAPILocator.getHostWebAPI().getCurrentHost(context.getRequest());
            fAPI = APILocator.getFolderAPI();
            navCache = CacheLocator.getNavToolCache();
        } catch (Exception e) {
            Logger.warn(this, e.getMessage(), e);
        }
View Full Code Here

 
  public void init(Object obj) {
    if(!Config.getBooleanProperty("ENABLE_SCRIPTING", false)){
      return;
    }
    ViewContext context = (ViewContext) obj;
   
    this.request = context.getRequest();
    ctx = context.getVelocityContext();   
    try {
      host = WebAPILocator.getHostWebAPI().getCurrentHost(request);
    } catch (PortalException e1) {
      Logger.error(this,e1.getMessage(),e1);
    } catch (SystemException e1) {
View Full Code Here

  public void init(Object obj) {
    if (!Config.getBooleanProperty("ENABLE_SCRIPTING", false)) {
      return;
    }

    ViewContext context = (ViewContext) obj;

    this.request = context.getRequest();
    ctx = context.getVelocityContext();
    this.request = context.getRequest();
    this.response = context.getResponse();
  }
View Full Code Here

  private HttpServletRequest request;

  private PollsAPI pollsAPI;
  private GlobalVariableWebAPI globalVars;
  public void init(Object obj) {
    ViewContext context = (ViewContext) obj;
    this.request = context.getRequest();
    pollsAPI = APILocator.getPollAPI();
    globalVars = new GlobalVariableWebAPI();
    globalVars.init(context);
  }
View Full Code Here

TOP

Related Classes of org.apache.velocity.tools.view.context.ViewContext

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.