str.append("dojo.require(\"tapestry.namespace\");").append(SYSTEM_NEWLINE) .append("tapestry.requestEncoding='") .append(cycle.getEngine().getOutputEncoding()).append("';") .append(SYSTEM_NEWLINE).append("</script>");
str.append("dojo.require(\"tapestry.namespace\");").append(SYSTEM_NEWLINE) .append("tapestry.requestEncoding='") .append(cycle.getEngine().getOutputEncoding()).append("';") .append(SYSTEM_NEWLINE).append("</script>");
page.attach(cycle.getEngine(), cycle);
page.attach(cycle.getEngine(), cycle);
/** * Gets the page from a pool, or otherwise loads the page. This operation is threadsafe. */ public IPage getPage(IRequestCycle cycle, String pageName) { IEngine engine = cycle.getEngine(); Object key = buildKey(engine, pageName); IPage result; // lock our page specific key lock first // This is only a temporary measure until a more robust // page pool implementation can be created. try { result = (IPage) _pool.borrowObject(key); } catch (Exception ex) { if (RuntimeException.class.isInstance(ex)) throw (RuntimeException)ex; else throw new ApplicationRuntimeException(PageloadMessages.errorPagePoolGet(key), ex); } if (result.getEngine() == null) { // This call will also fire events to any PageAttachListeners result.attach(engine, cycle); } return result; }
/** * Gets the page from a pool, or otherwise loads the page. This operation is threadsafe. */ public IPage getPage(IRequestCycle cycle, String pageName) { IEngine engine = cycle.getEngine(); Object key = buildKey(engine, pageName); IPage result; // lock our page specific key lock first // This is only a temporary measure until a more robust // page pool implementation can be created. try { result = (IPage) _pool.borrowObject(key); } catch (Exception ex) { if (RuntimeException.class.isInstance(ex)) throw (RuntimeException)ex; else throw new ApplicationRuntimeException(PageloadMessages.errorPagePoolGet(key), ex); } if (result.getEngine() == null) { // This call will also fire events to any PageAttachListeners result.attach(engine, cycle); } return result; }
public ILink constructLink(IEngineService service, boolean post, Map parameters, boolean stateful) { finalizeParameters(service, parameters); IEngine engine = _requestCycle.getEngine(); QueryParameterMap qmap = new QueryParameterMap(parameters); ServiceEncoding serviceEncoding = createServiceEncoding(qmap); // Give persistent property strategies a chance to store extra data // into the link. if (stateful) _persistenceStrategySource.addParametersForPersistentProperties(serviceEncoding, post); String fullServletPath = _request.getContextPath() + serviceEncoding.getServletPath(); return new EngineServiceLink(_requestCycle, fullServletPath, engine.getOutputEncoding(), _codec, _request, qmap, stateful); }
public ILink constructLink(IEngineService service, boolean post, Map parameters, boolean stateful) { finalizeParameters(service, parameters); IEngine engine = _requestCycle.getEngine(); QueryParameterMap qmap = new QueryParameterMap(parameters); ServiceEncoding serviceEncoding = createServiceEncoding(qmap); // Give persistent property strategies a chance to store extra data // into the link. if (stateful) _persistenceStrategySource.addParametersForPersistentProperties(serviceEncoding, post); String fullServletPath = _request.getContextPath() + serviceEncoding.getServletPath(); return new EngineServiceLink(_requestCycle, fullServletPath, engine.getOutputEncoding(), _codec, _request, qmap, stateful); }
/** * * {@inheritDoc} */ public void renderResponse(IRequestCycle cycle) throws IOException { if (_writer == null) { _localeManager.persistLocale(); IPage page = cycle.getPage(); ContentType contentType = page.getResponseContentType(); String encoding = contentType.getParameter(ENCODING_KEY); if (encoding == null) { encoding = cycle.getEngine().getOutputEncoding(); contentType.setParameter(ENCODING_KEY, encoding); } PrintWriter printWriter = _webResponse.getPrintWriter(contentType); _writer = _markupWriterSource.newMarkupWriter(printWriter, contentType); } // render response TapestryUtils.storePageRenderSupport(cycle, _prs); cycle.renderPage(this); TapestryUtils.removePageRenderSupport(cycle); flush(); if (_closeWriter) _writer.close(); }
/** * * {@inheritDoc} */ public void renderResponse(IRequestCycle cycle) throws IOException { if (_writer == null) { _localeManager.persistLocale(); IPage page = cycle.getPage(); ContentType contentType = page.getResponseContentType(); String encoding = contentType.getParameter(ENCODING_KEY); if (encoding == null) { encoding = cycle.getEngine().getOutputEncoding(); contentType.setParameter(ENCODING_KEY, encoding); } PrintWriter printWriter = _webResponse.getPrintWriter(contentType); _writer = _markupWriterSource.newMarkupWriter(printWriter, contentType); } // render response TapestryUtils.storePageRenderSupport(cycle, _prs); cycle.renderPage(this); TapestryUtils.removePageRenderSupport(cycle); flush(); if (_closeWriter) _writer.close(); }
/** * {@inheritDoc} */ public void renderResponse(IRequestCycle cycle) throws IOException { _localeManager.persistLocale(); IPage page = cycle.getPage(); _contentType = page.getResponseContentType(); String encoding = _contentType.getParameter(ENCODING_KEY); if (encoding == null) { encoding = cycle.getEngine().getOutputEncoding(); _contentType.setParameter(ENCODING_KEY, encoding); } if (_writer == null) { parseParameters(cycle); PrintWriter printWriter = _response.getPrintWriter(_contentType); _writer = _markupWriterSource.newJSONWriter(printWriter, _contentType); } // render response TapestryUtils.storePageRenderSupport(cycle, _prs); cycle.renderPage(this); TapestryUtils.removePageRenderSupport(cycle); flush(); _writer.close(); }
/** * {@inheritDoc} */ public void renderResponse(IRequestCycle cycle) throws IOException { _localeManager.persistLocale(); IPage page = cycle.getPage(); _contentType = page.getResponseContentType(); String encoding = _contentType.getParameter(ENCODING_KEY); if (encoding == null) { encoding = cycle.getEngine().getOutputEncoding(); _contentType.setParameter(ENCODING_KEY, encoding); } if (_writer == null) { parseParameters(cycle); PrintWriter printWriter = _response.getPrintWriter(_contentType); _writer = _markupWriterSource.newJSONWriter(printWriter, _contentType); } // render response TapestryUtils.storePageRenderSupport(cycle, _prs); cycle.renderPage(this); TapestryUtils.removePageRenderSupport(cycle); flush(); _writer.close(); }
/** * {@inheritDoc} */ public void renderResponse(IRequestCycle cycle) throws IOException { _localeManager.persistLocale(); ContentType contentType = new ContentType(CONTENT_TYPE + ";charset=" + cycle.getInfrastructure().getOutputEncoding()); String encoding = contentType.getParameter(ENCODING_KEY); if (encoding == null) { encoding = cycle.getEngine().getOutputEncoding(); contentType.setParameter(ENCODING_KEY, encoding); } if (_writer == null) { parseParameters(cycle); PrintWriter printWriter = _response.getPrintWriter(contentType); _writer = _markupWriterSource.newMarkupWriter(printWriter, contentType); } // render response TapestryUtils.storePageRenderSupport(cycle, _prs); cycle.renderPage(this); TapestryUtils.removePageRenderSupport(cycle); endResponse(); _writer.close(); }
/** * {@inheritDoc} */ public void renderResponse(IRequestCycle cycle) throws IOException { _localeManager.persistLocale(); ContentType contentType = new ContentType(CONTENT_TYPE + ";charset=" + cycle.getInfrastructure().getOutputEncoding()); String encoding = contentType.getParameter(ENCODING_KEY); if (encoding == null) { encoding = cycle.getEngine().getOutputEncoding(); contentType.setParameter(ENCODING_KEY, encoding); } if (_writer == null) { parseParameters(cycle); PrintWriter printWriter = _response.getPrintWriter(contentType); _writer = _markupWriterSource.newMarkupWriter(printWriter, contentType); } // render response TapestryUtils.storePageRenderSupport(cycle, _prs); cycle.renderPage(this); TapestryUtils.removePageRenderSupport(cycle); endResponse(); _writer.close(); }
encoding = cycle.getEngine().getOutputEncoding();
json.put("encoding", cycle.getEngine().getOutputEncoding());
json.put("encoding", cycle.getEngine().getOutputEncoding());
encoding = cycle.getEngine().getOutputEncoding();