congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
BufferedWebResponse.getText
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now