Search in sources :

Example 1 with HttpRequest

use of com.genexus.internet.HttpRequest in project JavaClasses by genexuslabs.

the class GXGridStateHandler method loadGridState.

public void loadGridState() {
    HttpContext httpContext = (HttpContext) context.getHttpContext();
    HttpRequest httpRequest = httpContext.getHttpRequest();
    if (GXutil.strcmp(httpRequest.getMethod(), "GET") == 0) {
        WebSession session = httpContext.getWebSession();
        state = new SdtGridState(context);
        state.fromJSonString(session.getValue(gridName));
        runVarsFromState();
        dirty = true;
    }
}
Also used : HttpRequest(com.genexus.internet.HttpRequest) WebSession(com.genexus.webpanels.WebSession) HttpContext(com.genexus.internet.HttpContext)

Example 2 with HttpRequest

use of com.genexus.internet.HttpRequest in project JavaClasses by genexuslabs.

the class WebWrapper method setSource.

public void setSource(GXWebPanel panel) {
    this.panel = panel;
    ModelContext context = panel.getModelContext();
    HttpRequest httpReq = ((HttpContext) context.getHttpContext()).getHttpRequest();
    IHttpServletRequest httpSerReq = ((HttpContext) context.getHttpContext()).getRequest();
    context.setHttpContext(new HttpContextNull());
    ((HttpContext) context.getHttpContext()).setHttpRequest(httpReq);
    ((HttpContext) context.getHttpContext()).setRequest(httpSerReq);
    ((HttpContext) context.getHttpContext()).setContext(context);
    panel.setHttpContext(((HttpContext) context.getHttpContext()));
    panel.getHttpContext().setCompression(false);
    panel.getHttpContext().setBuffered(false);
    panel.getHttpContext().useUtf8 = true;
    panel.getHttpContext().setOutputStream(new java.io.ByteArrayOutputStream());
}
Also used : ModelContext(com.genexus.ModelContext) HttpRequest(com.genexus.internet.HttpRequest) IHttpServletRequest(com.genexus.servlet.http.IHttpServletRequest) ByteArrayOutputStream(java.io.ByteArrayOutputStream) HttpContext(com.genexus.internet.HttpContext) HttpContextNull(com.genexus.internet.HttpContextNull)

Aggregations

HttpContext (com.genexus.internet.HttpContext)2 HttpRequest (com.genexus.internet.HttpRequest)2 ModelContext (com.genexus.ModelContext)1 HttpContextNull (com.genexus.internet.HttpContextNull)1 IHttpServletRequest (com.genexus.servlet.http.IHttpServletRequest)1 WebSession (com.genexus.webpanels.WebSession)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1