Package javax.faces.view

Examples of javax.faces.view.ViewMetadata


                {
                    ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(facesContext, derivedViewId);
                   
                    if (vdl != null)
                    {
                        ViewMetadata metadata = vdl.getViewMetadata(facesContext, newViewId);
                       
                        if (metadata != null)
                        {
                            viewRoot = metadata.createMetadataView(facesContext);
                        }
                    }
                }
               
                // viewRoot can be null here, if ...
View Full Code Here


                if (vdl != null)
                {
                    // If the current view has view parameters, as indicated by a non-empty
                    // and non-UnsupportedOperationException throwing
                    // return from ViewDeclarationLanguage.getViewMetadata(javax.faces.context.FacesContext, String)
                    ViewMetadata metadata = null;
                    try
                    {
                        metadata = vdl.getViewMetadata(context, getViewId());   
                    }
                    catch(UnsupportedOperationException e)
View Full Code Here

   * @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();
  }
View Full Code Here

            // Per the spec: build the view.
            ViewDeclarationLanguage vdl = _vdlFactory.getViewDeclarationLanguage(viewId);
            Object faceletViewState = null;
            try
            {
                ViewMetadata metadata = vdl.getViewMetadata (context, viewId);
               
                if (metadata != null)
                {
                    view = metadata.createMetadataView(context);
                   
                    // If no view and response complete there is no need to continue
                    if (view == null && context.getResponseComplete())
                    {
                        return null;
View Full Code Here

        else
        {
            // Per the spec: build the view.
            ViewDeclarationLanguage vdl = _vdlFactory.getViewDeclarationLanguage(viewId);
            try {
                ViewMetadata metadata = vdl.getViewMetadata (context, viewId);
               
                Collection<UIViewParameter> viewParameters = null;
               
                if (metadata != null)
                {
                    view = metadata.createMetadataView(context);
                   
                    if (view != null)
                    {
                        viewParameters = metadata.getViewParameters(view);
                    }
                }
                if (view == null)
                {
                    view = context.getApplication().getViewHandler().createView(context, viewId);
View Full Code Here

                if (vdl != null)
                {
                    // If the current view has view parameters, as indicated by a non-empty
                    // and non-UnsupportedOperationException throwing
                    // return from ViewDeclarationLanguage.getViewMetadata(javax.faces.context.FacesContext, String)
                    ViewMetadata metadata = null;
                    try
                    {
                        metadata = vdl.getViewMetadata(context, getViewId());   
                    }
                    catch(UnsupportedOperationException e)
View Full Code Here

     */
    @Test
    public void testBuildViewUIViewParameters() throws Exception
    {
        // build a UIViewRoot with a UIViewParameter
        ViewMetadata viewMetadata = this.vdl.getViewMetadata(facesContext, "viewparameter1.xhtml");
        UIViewRoot root = viewMetadata.createMetadataView(facesContext);
        facesContext.setViewRoot(root);

        // UIViewParameter must be there
        checkUIViewParameter(root);

View Full Code Here

                if (vdl != null)
                {
                    // If the current view has view parameters, as indicated by a non-empty
                    // and non-UnsupportedOperationException throwing
                    // return from ViewDeclarationLanguage.getViewMetadata(javax.faces.context.FacesContext, String)
                    ViewMetadata metadata = null;
                    try
                    {
                        metadata = vdl.getViewMetadata(context, getViewId());   
                    }
                    catch(UnsupportedOperationException e)
View Full Code Here

                return true;
            }
           
            if (vdl != null)
            {
                ViewMetadata metadata = vdl.getViewMetadata(facesContext, viewId);
               
                Collection<UIViewParameter> viewParameters = null;
               
                if (metadata != null)
                {
                    viewRoot = metadata.createMetadataView(facesContext);
                   
                    if (viewRoot != null)
                    {
                        viewParameters = ViewMetadata.getViewParameters(viewRoot);
                    }
View Full Code Here

                {
                    ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(facesContext, derivedViewId);
                   
                    if (vdl != null)
                    {
                        ViewMetadata metadata = vdl.getViewMetadata(facesContext, newViewId);
                       
                        if (metadata != null)
                        {
                            viewRoot = metadata.createMetadataView(facesContext);
                        }
                    }
                }
               
                // viewRoot can be null here, if ...
View Full Code Here

TOP

Related Classes of javax.faces.view.ViewMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.