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

How to use
getViewDeclarationLanguage
method
in
javax.faces.application.ViewHandler

Best Java code snippets using javax.faces.application.ViewHandler.getViewDeclarationLanguage (Showing top 20 results out of 315)

origin: primefaces/primefaces

/**
 * Builds the view if not already available. This is mostly required for ViewExpiredException's.
 *
 * @param context The {@link FacesContext}.
 * @param throwable The occurred {@link Throwable}.
 * @param rootCause The root cause.
 * @return The unwrapped {@link Throwable}.
 * @throws java.io.IOException If building the view fails.
 */
protected Throwable buildView(FacesContext context, Throwable throwable, Throwable rootCause) throws IOException {
  if (context.getViewRoot() == null) {
    ViewHandler viewHandler = context.getApplication().getViewHandler();
    String viewId = viewHandler.deriveViewId(context, ComponentUtils.calculateViewId(context));
    ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(context, viewId);
    UIViewRoot viewRoot = vdl.createView(context, viewId);
    context.setViewRoot(viewRoot);
    vdl.buildView(context, viewRoot);
    // Workaround for Mojarra
    // if UIViewRoot == null -> 'IllegalArgumentException' is throwed instead of 'ViewExpiredException'
    if (rootCause == null && throwable instanceof IllegalArgumentException) {
      rootCause = new javax.faces.application.ViewExpiredException(viewId);
    }
  }
  return rootCause;
}
origin: org.ocpsoft.rewrite/rewrite-integration-faces

@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(final FacesContext context, final String viewId)
{
 return parent.getViewDeclarationLanguage(context, viewId);
}
origin: ocpsoft/rewrite

@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(final FacesContext context, final String viewId)
{
 return parent.getViewDeclarationLanguage(context, viewId);
}
origin: com.ocpsoft/prettyfaces-jsf2

@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(final FacesContext context, final String viewId)
{
 return parent.getViewDeclarationLanguage(context, viewId);
}
origin: com.sun.faces/jsf-api

/**
 * <p>The default behavior of this method is to
 * call {@link ViewHandler#getViewDeclarationLanguage}
 * on the wrapped {@link ViewHandler} object.</p>
 *
 * @since 2.0
 */
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context,
                             String viewId) {
  return getWrapped().getViewDeclarationLanguage(context, viewId);
  
}

origin: javax/javaee-web-api

/**
 * <p>The default behavior of this method is to
 * call {@link ViewHandler#getViewDeclarationLanguage}
 * on the wrapped {@link ViewHandler} object.</p>
 *
 * @since 2.0
 */
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) {
  return getWrapped().getViewDeclarationLanguage(context, viewId);
}
origin: org.apache.myfaces.core/myfaces-api

@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(
    FacesContext context, String viewId)
{
  return getWrapped().getViewDeclarationLanguage(context, viewId);
}
origin: org.apache.myfaces.extensions.scripting/extscript-core

@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext facesContext, String s) {
  weaveDelegate();
  return _delegate.getViewDeclarationLanguage(facesContext, s);
}
origin: org.jboss.spec.javax.faces/jboss-jsf-api_2.0_spec

/**
 * <p>The default behavior of this method is to
 * call {@link ViewHandler#getViewDeclarationLanguage}
 * on the wrapped {@link ViewHandler} object.</p>
 *
 * @since 2.0
 */
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context,
                             String viewId) {
  return getWrapped().getViewDeclarationLanguage(context, viewId);
  
}

origin: javax.faces/javax.faces-api

/**
 * <p>The default behavior of this method is to
 * call {@link ViewHandler#getViewDeclarationLanguage}
 * on the wrapped {@link ViewHandler} object.</p>
 *
 * @since 2.0
 */
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) {
  return getWrapped().getViewDeclarationLanguage(context, viewId);
}
origin: org.glassfish/javax.faces

/**
 * <p>
 * The default behavior of this method is to call {@link ViewHandler#getViewDeclarationLanguage}
 * on the wrapped {@link ViewHandler} object.
 * </p>
 *
 * @since 2.0
 */
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) {
  return getWrapped().getViewDeclarationLanguage(context, viewId);
}
origin: stackoverflow.com

 String viewId = "/path/to/some.xhtml";
FacesContext context = FacesContext.getCurrentInstance();
ViewHandler viewHandler = context.getApplication().getViewHandler();

UIViewRoot view = viewHandler.createView(context, viewId);
viewHandler.getViewDeclarationLanguage(context, viewId).buildView(context, view);
// view should now have children.
origin: org.glassfish/jakarta.faces

/**
 * <p>
 * The default behavior of this method is to call {@link ViewHandler#getViewDeclarationLanguage}
 * on the wrapped {@link ViewHandler} object.
 * </p>
 *
 * @since 2.0
 */
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) {
  return getWrapped().getViewDeclarationLanguage(context, viewId);
}
origin: jboss/jboss-javaee-specs

/**
 * <p>The default behavior of this method is to
 * call {@link ViewHandler#getViewDeclarationLanguage}
 * on the wrapped {@link ViewHandler} object.</p>
 *
 * @since 2.0
 */
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) {
  return getWrapped().getViewDeclarationLanguage(context, viewId);
}
origin: omnifaces/omnifaces

/**
 * @see Faces#getViewDeclarationLanguage()
 */
public static ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context) {
  return context.getApplication().getViewHandler().getViewDeclarationLanguage(context, context.getViewRoot().getViewId());
}
origin: org.omnifaces/omnifaces

/**
 * @see Faces#getViewDeclarationLanguage()
 */
public static ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context) {
  return context.getApplication().getViewHandler().getViewDeclarationLanguage(context, context.getViewRoot().getViewId());
}
origin: de.beyondjava/angularFaces-core

public static void includeCompositeComponent(UIComponent parent, String taglibURI, String tagName, String id) {
  FacesContext context = FacesContext.getCurrentInstance();
  UIComponent composite = context.getApplication().getViewHandler()
      .getViewDeclarationLanguage(context, context.getViewRoot().getViewId())
      .createComponent(context, taglibURI, tagName, null);
  composite.setId(id);
  parent.getChildren().add(composite);
}
origin: org.omnifaces/omnifaces

/**
 * @see Faces#getMetadataAttributes(String)
 */
public static Map<String, Object> getMetadataAttributes(FacesContext context, String viewId) {
  ViewHandler viewHandler = context.getApplication().getViewHandler();
  ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(context, viewId);
  ViewMetadata metadata = vdl.getViewMetadata(context, viewId);
  return (metadata != null)
    ? metadata.createMetadataView(context).getAttributes()
    : Collections.<String, Object>emptyMap();
}
origin: omnifaces/omnifaces

/**
 * @see Faces#getMetadataAttributes(String)
 */
public static Map<String, Object> getMetadataAttributes(FacesContext context, String viewId) {
  ViewHandler viewHandler = context.getApplication().getViewHandler();
  ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(context, viewId);
  ViewMetadata metadata = vdl.getViewMetadata(context, viewId);
  return (metadata != null)
    ? metadata.createMetadataView(context).getAttributes()
    : Collections.<String, Object>emptyMap();
}
origin: org.apache.myfaces.tobago/tobago-core

private void renderErrorPage(final FacesContext facesContext, final String errorPageLocation) throws IOException {
 final ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
 final UIViewRoot viewRoot = viewHandler.createView(facesContext, errorPageLocation);
 facesContext.setViewRoot(viewRoot);
 facesContext.getPartialViewContext().setRenderAll(true);
 final ViewDeclarationLanguage viewDeclarationLanguage = viewHandler
   .getViewDeclarationLanguage(facesContext, errorPageLocation);
 viewDeclarationLanguage.buildView(facesContext, viewRoot);
 facesContext.getApplication().publishEvent(facesContext, PreRenderViewEvent.class, viewRoot);
 viewDeclarationLanguage.renderView(facesContext, viewRoot);
 facesContext.responseComplete();
}
javax.faces.applicationViewHandlergetViewDeclarationLanguage

Javadoc

Return the ViewDeclarationLanguage instance used for this ViewHandler instance.

The default implementation must use javax.faces.view.ViewDeclarationLanguageFactory#getViewDeclarationLanguage to obtain the appropriate ViewDeclarationLanguage implementation for the argument viewId. Any exceptions thrown as a result of invoking that method must not be swallowed.

The default implementation of this method returns null.

Popular methods of ViewHandler

  • getActionURL
    If the value returned from this method is used as the file argument to the four-argument constructor
  • createView
    Create and return a new UIViewRoot instance initialized with information from the argument FacesCont
  • getResourceURL
    If the value returned from this method is used as the file argument to the four-argument constructor
  • restoreView
    Perform whatever actions are required to restore the view associated with the specified FacesContext
  • calculateRenderKitId
    Return an appropriate renderKitId for this and subsequent requests from the current client. It is an
  • calculateLocale
    Returns an appropriate Locale to use for this and subsequent requests for the current client.
  • writeState
    Take any appropriate action to either immediately write out the current state information (by callin
  • renderView
    Perform whatever actions are required to render the response view to the response object associated
  • initView
    Initialize the view for the request processing lifecycle. This method must be called at the beginni
  • getBookmarkableURL
    Return a JSF action URL derived from the viewId argument that is suitable to be used as the target
  • getRedirectURL
    Return a JSF action URL derived from the viewId argument that is suitable to be used by the Navigat
  • calculateCharacterEncoding
    Returns the correct character encoding to be used for this request. The following algorithm is empl
  • getRedirectURL,
  • calculateCharacterEncoding,
  • deriveViewId,
  • deriveLogicalViewId,
  • getProtectedViewsUnmodifiable,
  • addProtectedView,
  • getViews,
  • getWebsocketURL,
  • removeProtectedView

Popular in Java

  • Running tasks concurrently on multiple threads
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Notification (javax.management)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Best IntelliJ plugins
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