congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RequestContext.isPortletRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
isPortletRequest
method
in
org.apache.wicket.RequestContext

Best Java code snippets using org.apache.wicket.RequestContext.isPortletRequest (Showing top 20 results out of 315)

origin: org.onehippo.cms7/hippo-cms-xinha-integration

public static final String encodeResourceURL(String url) {
  // if it is in portlet environment, just wrap the url in portlet resource url.
  RequestContext requestContext = RequestContext.get();
  if (requestContext.isPortletRequest()) {
    url = ((PortletRequestContext) requestContext).encodeResourceURL(url).toString();
    // use relative url (FIXME: why?)
    if (url.startsWith("http:") || url.startsWith("https:")) {
      int offset = url.indexOf('/', 8);
      if (offset != -1) {
        url = url.substring(offset);
      }
    }
  }
  return url;
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

protected String getContextRelativeValue(String value)
{
  if ("href".equals(attribute) || "src".equals(attribute))
  {
    RequestContext rc = RequestContext.get();
    if (rc.isPortletRequest() &&
        !(value.startsWith("http://") || value.startsWith("https://")))
    {
      if ("href".equals(attribute))
      {
        value = ((PortletRequestContext)rc).encodeRenderURL(value).toString();
      }
      else
      {
        value = ((PortletRequestContext)rc).encodeSharedResourceURL(value).toString();
      }
    }
  }
  return value;
}
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Checks if <code>value</code> represents a path and if it does transforms it into a relative
 * path
 * 
 * @param value
 * @return value as a relative path or untouched if not a path
 */
protected String getContextRelativeValue(String value)
{
  if ("href".equals(attribute) || "src".equals(attribute))
  {
    RequestContext rc = RequestContext.get();
    if (rc.isPortletRequest() &&
      !(value.startsWith("http://") || value.startsWith("https://")))
    {
      if ("href".equals(attribute))
      {
        value = ((PortletRequestContext)rc).encodeRenderURL(value).toString();
      }
      else
      {
        value = ((PortletRequestContext)rc).encodeSharedResourceURL(value).toString();
      }
    }
  }
  return value;
}
origin: org.ops4j.pax.wicket/pax-wicket-service

if (RequestContext.get().isPortletRequest())
origin: org.apache.wicket/com.springsource.org.apache.wicket

if (RequestContext.get().isPortletRequest())
origin: org.ops4j.pax.wicket/pax-wicket-service

public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer)
{
  RequestContext rc = RequestContext.get();
  if (rc.isPortletRequest() && ((PortletRequestContext)rc).isEmbedded())
  {
    deleteFragment(responseBuffer, "<?xml", "?>");
    deleteFragment(responseBuffer, "<!DOCTYPE", ">");
    deleteOpenTag(responseBuffer, "html");
    deleteOpenTag(responseBuffer, "head");
    deleteOpenTag(responseBuffer, "body");
  }
  return responseBuffer;
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * @see org.apache.wicket.IResponseFilter#filter(AppendingStringBuffer)
 */
public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer)
{
  RequestContext rc = RequestContext.get();
  if (rc.isPortletRequest() && ((PortletRequestContext)rc).isEmbedded())
  {
    deleteFragment(responseBuffer, "<?xml", "?>");
    deleteFragment(responseBuffer, "<!DOCTYPE", ">");
    deleteOpenTag(responseBuffer, "html");
    deleteOpenTag(responseBuffer, "head");
    deleteOpenTag(responseBuffer, "body");
  }
  return responseBuffer;
}
origin: org.ops4j.pax.wicket/pax-wicket-service

if (rc.isPortletRequest() && ((PortletRequestContext)rc).isEmbedded())
origin: org.apache.wicket/com.springsource.org.apache.wicket

if (rc.isPortletRequest() && ((PortletRequestContext)rc).isEmbedded())
origin: org.apache.wicket/com.springsource.org.apache.wicket

if (rc.isPortletRequest())
origin: org.ops4j.pax.wicket/pax-wicket-service

if (rc.isPortletRequest())
origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * @see org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead(org.apache.wicket.markup.html.IHeaderResponse)
 */
@Override
public void renderHead(IHeaderResponse response)
{
  super.renderHead(response);
  final IDebugSettings debugSettings = Application.get().getDebugSettings();
  response.renderJavascriptReference(WicketEventReference.INSTANCE);
  response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
  if (debugSettings.isAjaxDebugModeEnabled())
  {
    response.renderJavascriptReference(JAVASCRIPT_DEBUG);
    response.renderJavascript("wicketAjaxDebugEnable=true;", "wicket-ajax-debug-enable");
  }
  RequestContext context = RequestContext.get();
  if (context.isPortletRequest())
  {
    response.renderJavascript("Wicket.portlet=true", "wicket-ajax-portlet-flag");
  }
}
origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * @see org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead(org.apache.wicket.markup.html.IHeaderResponse)
 */
public void renderHead(IHeaderResponse response)
{
  super.renderHead(response);
  final IDebugSettings debugSettings = Application.get().getDebugSettings();
  response.renderJavascriptReference(WicketEventReference.INSTANCE);
  response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
  if (debugSettings.isAjaxDebugModeEnabled())
  {
    response.renderJavascriptReference(JAVASCRIPT_DEBUG);
    response.renderJavascript("wicketAjaxDebugEnable=true;", "wicket-ajax-debug-enable");
  }
  RequestContext context = RequestContext.get();
  if (context.isPortletRequest())
  {
    response.renderJavascript("Wicket.portlet=true", "wicket-ajax-portlet-flag");
  }
}
origin: org.ops4j.pax.wicket/pax-wicket-service

if (rc.isPortletRequest())
origin: org.apache.wicket/com.springsource.org.apache.wicket

if (rc.isPortletRequest())
origin: org.ops4j.pax.wicket/pax-wicket-service

if (rc.isPortletRequest())
origin: org.apache.wicket/com.springsource.org.apache.wicket

if (rc.isPortletRequest())
origin: org.apache.wicket/com.springsource.org.apache.wicket

if (rc.isPortletRequest())
origin: org.ops4j.pax.wicket/pax-wicket-service

if (rc.isPortletRequest())
origin: org.ops4j.pax.wicket/pax-wicket-service

if (!RequestContext.get().isPortletRequest())
org.apache.wicketRequestContextisPortletRequest

Popular methods of RequestContext

  • get
  • encodeRenderURL
    Encodes URL's for render URLs, typically overridden by the portlet implementation.
  • encodeResourceURL
    Encodes URL's for resource targets, typically overridden by the portlet implementation.
  • encodeSharedResourceURL
    Encodes URL's for shared resource targets, typically overridden by the portlet implementation.
  • <init>
    Construct.
  • encodeMarkupId
    Encodes markup Ids, typically overridden by the portlet implementation.
  • getHeaderResponse
    Used to override response objects, typically used by the portlet implementation. In a Portlet envir
  • getNamespace
  • set
    Sets the RequestContext for the current threads active request.
  • unset
    Resets the RequestContext for the current threads active request.

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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