Codota Logo
BufferedWebResponse.getText
Code IndexAdd Codota to your IDE (free)

How to use
getText
method
in
org.apache.wicket.protocol.http.BufferedWebResponse

Best Java code snippets using org.apache.wicket.protocol.http.BufferedWebResponse.getText (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.wicketstuff/wicket-poi

/**
 * Parse the grid component to a {@link Sheet} object
 * 
 * @param workbook
 * @throws IOException
 * @throws ResourceStreamNotFoundException
 * @throws ParseException
 */
public void parse(Component tableComponent) throws IOException,
  ResourceStreamNotFoundException, ParseException
{
  try
  {
    BufferedWebResponse mockResponse = doRequest(tableComponent);
    doParse(mockResponse.getText(), tableComponent);
  }
  finally
  {
    afterParse(tableComponent);
  }
}
origin: org.apache.wicket/wicket-core

/**
 * Collects the html generated by rendering a page.
 *
 * @param page
 *            supplier of the page
 * @return the html rendered by the panel
 */
public CharSequence renderPage(final Supplier<? extends Page> page)
{
  return inThreadContext(() -> {
    Request request = newRequest();
    BufferedWebResponse response = new BufferedWebResponse(null);
    RequestCycle cycle = application.createRequestCycle(request, response);
    ThreadContext.setRequestCycle(cycle);
    page.get().renderPage();
    return response.getText();
  });
}
origin: apache/wicket

/**
 * Collects the html generated by rendering a page.
 *
 * @param page
 *            supplier of the page
 * @return the html rendered by the panel
 */
public CharSequence renderPage(final Supplier<? extends Page> page)
{
  return inThreadContext(() -> {
    Request request = newRequest();
    BufferedWebResponse response = new BufferedWebResponse(null);
    RequestCycle cycle = application.createRequestCycle(request, response);
    ThreadContext.setRequestCycle(cycle);
    page.get().renderPage();
    return response.getText();
  });
}
origin: apache/wicket

@Override
public void afterRender(final Component component)
{
  final RequestCycle requestCycle = RequestCycle.get();
  try
  {
    BufferedWebResponse tempResponse = (BufferedWebResponse)requestCycle.getResponse();
    if (component instanceof Page && originalResponse instanceof WebResponse)
    {
      tempResponse.writeMetaData((WebResponse) originalResponse);
    }
    // Transform the data
    CharSequence output = transform(component, tempResponse.getText());
    originalResponse.write(output);
  }
  catch (Exception ex)
  {
    throw new WicketRuntimeException("Error while transforming the output of component: " +
      component, ex);
  }
  finally
  {
    // Restore the original response object
    requestCycle.setResponse(originalResponse);
  }
}
origin: org.apache.wicket/wicket-core

@Override
public void afterRender(final Component component)
{
  final RequestCycle requestCycle = RequestCycle.get();
  try
  {
    BufferedWebResponse tempResponse = (BufferedWebResponse)requestCycle.getResponse();
    if (component instanceof Page && originalResponse instanceof WebResponse)
    {
      tempResponse.writeMetaData((WebResponse) originalResponse);
    }
    // Transform the data
    CharSequence output = transform(component, tempResponse.getText());
    originalResponse.write(output);
  }
  catch (Exception ex)
  {
    throw new WicketRuntimeException("Error while transforming the output of component: " +
      component, ex);
  }
  finally
  {
    // Restore the original response object
    requestCycle.setResponse(originalResponse);
  }
}
origin: org.apache.wicket/wicket-core

return tempResponse.getText();
origin: apache/wicket

return tempResponse.getText();
origin: apache/wicket

/**
 * Collects the Html generated by the rendering a page.
 * <p>
 * Important note: Must be called on a thread bound to an application's {@link ThreadContext}!
 *
 * @param pageProvider
 *            the provider of the page class/instance and its parameters
 * @return the html rendered by a page
 * 
 * @see ThreadContext
 */
public static CharSequence renderPage(final PageProvider pageProvider)
{
  Application application = Application.get();
  RequestCycle originalRequestCycle = RequestCycle.get();
  BufferedWebResponse tempResponse = new BufferedWebResponse(null);
  RequestCycle tempRequestCycle = application
    .createRequestCycle(originalRequestCycle.getRequest(), tempResponse);
  try
  {
    ThreadContext.setRequestCycle(tempRequestCycle);
    pageProvider.getPageInstance().renderPage();
  }
  finally
  {
    ThreadContext.setRequestCycle(originalRequestCycle);
  }
  return tempResponse.getText();
}
origin: org.apache.wicket/wicket-core

/**
 * Collects the Html generated by the rendering a page.
 * <p>
 * Important note: Must be called on a thread bound to an application's {@link ThreadContext}!
 *
 * @param pageProvider
 *            the provider of the page class/instance and its parameters
 * @return the html rendered by a page
 * 
 * @see ThreadContext
 */
public static CharSequence renderPage(final PageProvider pageProvider)
{
  Application application = Application.get();
  RequestCycle originalRequestCycle = RequestCycle.get();
  BufferedWebResponse tempResponse = new BufferedWebResponse(null);
  RequestCycle tempRequestCycle = application
    .createRequestCycle(originalRequestCycle.getRequest(), tempResponse);
  try
  {
    ThreadContext.setRequestCycle(tempRequestCycle);
    pageProvider.getPageInstance().renderPage();
  }
  finally
  {
    ThreadContext.setRequestCycle(originalRequestCycle);
  }
  return tempResponse.getText();
}
org.apache.wicket.protocol.httpBufferedWebResponsegetText

Javadoc

Returns the text already written to this response.

Popular methods of BufferedWebResponse

  • <init>
    Construct.
  • encodeURL
  • filter
  • reset
  • write
  • writeMetaData
    transfer cookie operations (add, clear) to given web response
  • writeStream
  • writeTo
    Writes the content of the buffer to the specified response. Also sets the properties and and headers

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now