Package com.webobjects.appserver

Examples of com.webobjects.appserver.WORequest


   */
  @Override
  public boolean wasFormSubmitted() {
    boolean wasFormSubmitted = super.wasFormSubmitted();
    if (wasFormSubmitted) {
      WORequest request = request();
      String partialSubmitSenderID = ERXAjaxApplication.partialFormSenderID(request);
      if (partialSubmitSenderID != null) {
        // TODO When explicitly setting the "name" binding on an input,
        // the following will fail in the takeValuesFromRequest phase.
        String elementID = elementID();
View Full Code Here


   * @return true の場合は登録しないように
   * </span>
   */
  @SuppressWarnings("javadoc")
  public static boolean shouldNotStorePage(WOContext context) {
    WORequest request = context.request();
    WOResponse response = context.response();
    // MS: The "AJAX_SUBMIT_BUTTON_NAME" check is a total hack, but if your
    // page structure changes such that the form that
    // is being submitted to is hidden, it ends up not notifying the system
    // not to cache the page.
View Full Code Here

  @Override
  @Deprecated
  public boolean _wasFormSubmitted() {
    boolean wasFormSubmitted = super._wasFormSubmitted();
    if (wasFormSubmitted) {
      WORequest request = request();
      String partialSubmitSenderID = ERXAjaxApplication.partialFormSenderID(request);
      if (partialSubmitSenderID != null) {
        // TODO When explicitly setting the "name" binding on an input,
        // the following will fail in the takeValuesFromRequest phase.
        String elementID = elementID();
View Full Code Here

  {
    return aSession.restorePageForContextID(oldContextID);
  }

  private WOResponse _dispatchWithPreparedPage(WOComponent aPage, WOSession aSession, WOContext aContext, NSDictionary someElements) {
    WORequest aRequest = aContext.request();
    WOApplication anApplication = WOApplication.application();
    WOResponse aResponse = anApplication.createResponseInContext(aContext);
    String aSenderID = aContext.senderID();

    String oldContextID = aSession._contextIDMatchingIDs(aContext);
    aResponse.setHTTPVersion(aRequest.httpVersion());

    aResponse.setHeader("text/html", "content-type");

    aContext._setResponse(aResponse);

    if (oldContextID == null)
    {
      if (aSenderID != null)
      {
        if (aRequest._hasFormValues()) {
          anApplication.takeValuesFromRequest(aRequest, aContext);
        }
      }

      aContext._setPageChanged(false);
View Full Code Here

    if ((oldSessionID == null) || (oldContextID == null))
    {
      if ((aPageName == null) && (!aSession.storesIDsInCookies()))
      {
        WORequest request = aContext.request();

        String cookieHeader = request.headerForKey("cookie");

        if ((cookieHeader != null) && (cookieHeader.length() > 0)) {
          NSDictionary cookieDict = request.cookieValues();

          if ((cookieDict.objectForKey(WOApplication.application().sessionIdKey()) != null) || (cookieDict.objectForKey(WOApplication.application().instanceIdKey()) != null)) {
            clearIDsInCookies = true;
          }
        }
View Full Code Here

   * instead.
   */
  public WebSocket create(Channel channel, HttpRequest req) {
    ERXApplication._startRequest();
    try {
      WORequest request = null;
      try {
        request = ERWOAdaptorUtilities.asWORequest(req);
      } catch (IOException e) {
        throw NSForwardException._runtimeExceptionForThrowable(e);
      }
View Full Code Here

   * with different browser versions.
   * @return browser object
   */
  public ERXBrowser browser() {
    if (_browser == null && context() != null) {
      WORequest request = context().request();
      if (request != null) {
        ERXBrowserFactory browserFactory = ERXBrowserFactory.factory();
        if (request instanceof ERXRequest) {
          _browser = ((ERXRequest) request).browser();
        }
View Full Code Here

   * if the value is 1.
   * @return if js is enabled, defaults to true.
   */
  //CHECKME: (ak) I don't understand this? Having a default of TRUE makes no sense. At least not without some ERXJSCheckJavaScript component that would set a value on &lt;NOSCRIPT&gt; or sth like this.
  public boolean javaScriptEnabled() {
    WORequest request = context() != null ? context().request() : null;
    if (_javaScriptEnabled == null && request != null) {
      // FIXME: Shouldn't be hardcoded form value.
      String js = request.stringFormValueForKey("javaScript");
      if (js != null) {
        if (log.isDebugEnabled())
          log.debug("Received javascript form value " + js);
      }
      else {
        try {
          js = request.cookieValueForKey(JAVASCRIPT_ENABLED_COOKIE_NAME);
        }
        catch (StringIndexOutOfBoundsException e) {
          // malformed cookies cause WO 5.1.3 to raise here
        }
      }
View Full Code Here

    super.awake();
    ERXSession.setSession(this);
    ERXLocalizer.setCurrentLocalizer(localizer());
    NSNotificationCenter.defaultCenter().postNotification(SessionWillAwakeNotification, this);

    WORequest request = context() != null ? context().request() : null;
    if (request != null && log.isDebugEnabled() && request.headerForKey("content-type") != null) {
      if ((request.headerForKey("content-type")).toLowerCase().indexOf("multipart/form-data") == -1)
        log.debug("Form values " + request.formValues());
      else
        log.debug("Multipart Form values found");
    }
    _originalThreadName = Thread.currentThread().getName();
    Thread.currentThread().setName(threadName());
View Full Code Here

 
  @SuppressWarnings("unchecked")
  public synchronized void updateLoadedClasses(NSNotification notification) {
    Reloader reloader = ReloaderFactory.getInstance();
    if (notification != null) {
      WORequest request = (WORequest) notification.object();
      String key = "/" + WOApplication.application().resourceRequestHandlerKey();
      if (request.uri().indexOf(request.adaptorPrefix()) != 0 || request.uri().indexOf(key) >= 0) {
        return;
      }
    }
    NSDictionary classList = WOClassCacheAccessor.getClassCache();
    String unknownClassName = "com.webobjects.foundation._NSUtilities$_NoClassUnderTheSun";
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WORequest

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.