use of com.genexus.internet.HttpContextNull in project JavaClasses by genexuslabs.
the class JavaModelContextExtension method submitCopy.
@Override
public ModelContext submitCopy(ModelContext modelContext) {
ModelContext newContext = new ModelContext(modelContext);
newContext.setHttpContext(new HttpContextNull());
initializeSubmitSession(modelContext, newContext);
HttpContext ctx = (HttpContext) modelContext.getHttpContext();
if (ctx != null) {
HttpContext newHttpContext = (HttpContext) newContext.getHttpContext();
newHttpContext.setDefaultPath(ctx.getDefaultPath());
newHttpContext.setContextPath(ctx.getContextPath());
newHttpContext.setStaticContentBase(ctx.getStaticContentBase());
newHttpContext.setClientId(ctx.getClientId());
newHttpContext.setLanguage(ctx.getLanguage());
}
return newContext;
}
use of com.genexus.internet.HttpContextNull 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());
}
Aggregations