Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOContext.request()


   
    public WOActionResults keepAliveAction() {
      WOApplication application = WOApplication.application();
      WOContext context = context();
      WOResponse response = application.createResponseInContext(context);
      String sessionID = context.request().stringFormValueForKey("erxsid");
      if (!application.isRefusingNewSessions()) {
        WOSession session = application.restoreSessionWithID(sessionID, context);
        if (session != null) {
          log.debug("Pinging " + sessionID);
          // CHECKME TH do we still need that?
View Full Code Here


   */
  public static void redirectTo(WOComponent component) {
    WOContext context = component.context();
        ERXRedirect redirect = (ERXRedirect)component.pageWithName(ERXRedirect.class.getName());
        redirect.setComponent(component);
        redirect.appendToResponse(AjaxUtils.createResponse(context.request(), context), context);
  }
 
  /**
   * <code>updateDomElement</code> appends JavaScript code to the given
   * AjaxResponse that updates the content of the DOM Element with the given
View Full Code Here

      if (!isInitialized) {
        initialize();
      }
      WOContext context = ERXWOContext.currentContext();
      // set the current localizer
      if (context != null && context.request() != null && context.request().browserLanguages() != null) {
        current = ERXLocalizer.localizerForLanguages(context.request().browserLanguages());
        ERXLocalizer.setCurrentLocalizer(current);
      }
      else {
        current = defaultLocalizer();
View Full Code Here

      if (!isInitialized) {
        initialize();
      }
      WOContext context = ERXWOContext.currentContext();
      // set the current localizer
      if (context != null && context.request() != null && context.request().browserLanguages() != null) {
        current = ERXLocalizer.localizerForLanguages(context.request().browserLanguages());
        ERXLocalizer.setCurrentLocalizer(current);
      }
      else {
        current = defaultLocalizer();
View Full Code Here

        initialize();
      }
      WOContext context = ERXWOContext.currentContext();
      // set the current localizer
      if (context != null && context.request() != null && context.request().browserLanguages() != null) {
        current = ERXLocalizer.localizerForLanguages(context.request().browserLanguages());
        ERXLocalizer.setCurrentLocalizer(current);
      }
      else {
        current = defaultLocalizer();
      }
View Full Code Here

      // there is no other easy way to generate a url with no appNumber and sessionID
      WOContext newContext = new WOContext(context().request());
      newContext._url().setApplicationNumber("-1");
     
      // 1) get protocol + servername + port
      newContext.request()._completeURLPrefix(url, false, 0);
     
      // 2) prepare request params
      NSMutableDictionary requestParams = new NSMutableDictionary();
      requestParams.setObjectForKey(pageConfiguration(), RequestParams.PageConfiguration);
      requestParams.setObjectForKey(d2wContext().entity().name(), RequestParams.EntityName);
View Full Code Here

  }

  public String attachmentUrl() {
    WOContext context = context();
    ERAttachment attachment = attachment();
    return ERAttachmentProcessor.processorForType(attachment).attachmentUrl(attachment, context.request(), context);
  }
}
View Full Code Here

  }

  public String attachmentUrl() {
    WOContext context = context();
    ERAttachment attachment = attachment();
    return ERAttachmentProcessor.processorForType(attachment).attachmentUrl(attachment, context.request(), context);
  }

  public String iconPath() {
    return ERAttachmentIcon.iconPath(attachment(), valueForBinding("size"));
  }
View Full Code Here

   */
  @Override
  public void savePage(WOComponent page) {
    WOContext context = context();
    if (ERXAjaxApplication.shouldNotStorePage(context)) {
      if (logger.isDebugEnabled()) logger.debug("Considering pageReplacementCache for " + context.request().uri() + " with contextID " + context.contextID());
      WORequest request = context.request();
      WOResponse response = context.response();
      String pageCacheKey = null;
      if (response != null) {
        pageCacheKey = response.headerForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY);
View Full Code Here

  @Override
  public void savePage(WOComponent page) {
    WOContext context = context();
    if (ERXAjaxApplication.shouldNotStorePage(context)) {
      if (logger.isDebugEnabled()) logger.debug("Considering pageReplacementCache for " + context.request().uri() + " with contextID " + context.contextID());
      WORequest request = context.request();
      WOResponse response = context.response();
      String pageCacheKey = null;
      if (response != null) {
        pageCacheKey = response.headerForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.