Trys to get the composite component using getCompositeComponentBasedOnLocation()
and saves it in an attribute on the FacesContext, which is then used by
CompositeComponentImplicitObject.
@param facesContext
@param location
486084
public static void saveCompositeComponentForResolver(FacesContext facesContext, Location location, int ccLevel)
    {
        UIComponent cc = ccLevel > 0 ? getCompositeComponentBasedOnLocation(facesContext, location, ccLevel)
                : getCompositeComponentBasedOnLocation(facesContext, location);
        List<UIComponent> list = (List<UIComponent>) facesContext.getAttributes().get(CURRENT_COMPOSITE_COMPONENT_KEY);
        if (list == null)
        {
            list = new ArrayList<UIComponent>();
            facesContext.getAttributes().put(CURRENT_COMPOSITE_COMPONENT_KEY, list);
        }
        list.add(cc);
    }
971568
public boolean invokeOnComponent(FacesContext context, String clientId,
                                     ContextCallback callback)
            throws FacesException {
        return super.invokeOnComponent(context, clientId, callback);
    }
1150058
protected ELContext getELContext() {
	FacesContext fc = getFacesContext();
	ELContext result = null;
	if (null != fc) {
	    result = fc.getELContext();
	}
	return result;
    }
1066428
private Resource findComponentResourceBundleLocaleMatch(FacesContext context, 
            String resourceName, String libraryName) {
        Resource result = null;
        ResourceBundle resourceBundle = null;
        int i;
        if (-1 != (i = resourceName.lastIndexOf("."))) {
            resourceName = resourceName.substring(0, i) +
                    ".properties";
            if (null != context) {
                result = context.getApplication().getResourceHandler().
                        createResource(resourceName, libraryName);
                InputStream propertiesInputStream = null;
                try {
                    propertiesInputStream = result.getInputStream();
                    resourceBundle = new PropertyResourceBundle(propertiesInputStream);
                } catch (IOException ex) {
                    Logger.getLogger(UIComponent.class.getName()).log(Level.SEVERE, null, ex);
                } finally{
                    if(null != propertiesInputStream){
                        try{
                            propertiesInputStream.close();
                        } catch(IOException ioe){
                            if (LOGGER.isLoggable(Level.SEVERE)) {
                                LOGGER.log(Level.SEVERE, null, ioe);
                            }
                        }
                    }
                }
            }
        }
        result = (null != resourceBundle) ? result : null;
        
        return result;
    }
7158
public void encodeEnd(FacesContext facesContext, UIComponent component)
            throws IOException
    {
        RendererUtils.checkParamValidity(facesContext, component, null);
        
        Map<String, List<ClientBehavior>> behaviors = null;
        if (component instanceof ClientBehaviorHolder)
        {
            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
            if (!behaviors.isEmpty())
            {
                ResourceUtils.renderDefaultJsfJsInlineIfNecessary(
                        facesContext, facesContext.getResponseWriter());
            }
        }

        if (component instanceof UISelectMany)
        {
            renderMenu(facesContext,
                                         (UISelectMany)component,
                                         isDisabled(facesContext, component),
                                         getConverter(facesContext, component));
        }
        else if (component instanceof UISelectOne)
        {
            renderMenu(facesContext,
                                         (UISelectOne)component,
                                         isDisabled(facesContext, component),
                                         getConverter(facesContext, component));
        }
        else
        {
            throw new IllegalArgumentException("Unsupported component class " + component.getClass().getName());
        }
    }
187058
ExecutionLocation getLocation(ParserRuleContext object) {
    Token start = object.getStart();
    return new ExecutionLocation(currentScope.declaringEnvironment.path, start.getLine(), start.getCharPositionInLine() + 1);
  }
1142814
protected FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext)
    {
        return _ComponentUtils.findNestingForm(uiComponent, facesContext);
    }
575977
public static FacesInitializer getFacesInitializer(ServletContext context)
    {
        FacesInitializer initializer = _getFacesInitializerFromInitParam(context);
        if (initializer == null)
        {
            initializer = _getDefaultFacesInitializer(context);
        }
        return initializer;
    }
444471
public Expression withSourceLocation(SourceLocation location) {
    checkNotNull(location);
    if (location.equals(this.location)) {
      return this;
    }
    return new Expression(resultType, features, location) {
      @Override
      protected void doGen(CodeBuilder adapter) {
        Expression.this.gen(adapter);
      }
    };
  }
642398
def _makeLocationElement(self, locationObject, name=None):
        

        locElement = ET.Element("location")
        if name is not None:
           locElement.attrib['name'] = name
        for dimensionName, dimensionValue in locationObject.items():
           dimElement = ET.Element('dimension')
           dimElement.attrib['name'] = dimensionName
           if type(dimensionValue)==tuple:
               dimElement.attrib['xvalue'] = "%f"%dimensionValue[0]
               dimElement.attrib['yvalue'] = "%f"%dimensionValue[1]
           else:
               dimElement.attrib['xvalue'] = "%f"%dimensionValue
           locElement.append(dimElement)
        return locElement
405528
protected void setMemberFactories(FaceletCache.MemberFactory<V> faceletFactory,
                                      FaceletCache.MemberFactory<V> viewMetadataFaceletFactory,
                                      FaceletCache.MemberFactory<V> compositeComponentMetadataFaceletFactory)
    {
        if  (compositeComponentMetadataFaceletFactory == null)
        {
            throw new NullPointerException("viewMetadataFaceletFactory is null");
        }
        _compositeComponentMetadataFaceletFactory = compositeComponentMetadataFaceletFactory;
        setMemberFactories(faceletFactory, viewMetadataFaceletFactory);
    }
921151
public static Filter getFilterForLocation(String location, String context) throws IllegalArgumentException {
        String filter = makeLocationFilterString(location, context);
        try {
            return FrameworkUtil.createFilter(filter);
        } catch (InvalidSyntaxException e) {
            throw new IllegalArgumentException("location is invalid: " + location, e);
        }
    }
1037339
private void saveToContext(Context context, boolean updateSiteStructure) {
		ParameterParser urlParamParser = context.getUrlParamParser();
		ParameterParser formParamParser = context.getPostParamParser();
		List<String> structParams = new ArrayList<String>();
		List<StructuralNodeModifier> ddns = new ArrayList<StructuralNodeModifier>();
		
		for (StructuralNodeModifier snm : this.ddnTableModel.getElements()) {
			if (snm.getType().equals(StructuralNodeModifier.Type.StructuralParameter)) {
				structParams.add(snm.getName());
			} else {
				ddns.add(snm);
			}
		}

		if (urlParamParser instanceof StandardParameterParser) {
			StandardParameterParser urlStdParamParser = (StandardParameterParser) urlParamParser;
			urlStdParamParser.setKeyValuePairSeparators(this.getUrlKvPairSeparators().getText());
			urlStdParamParser.setKeyValueSeparators(this.getUrlKeyValueSeparators().getText());

			urlStdParamParser.setStructuralParameters(structParams);

			context.setUrlParamParser(urlStdParamParser);
			urlStdParamParser.setContext(context);
		}
		if (formParamParser instanceof StandardParameterParser) {
			StandardParameterParser formStdParamParser = (StandardParameterParser) formParamParser;
			formStdParamParser.setKeyValuePairSeparators(this.getPostKvPairSeparators().getText());
			formStdParamParser.setKeyValueSeparators(this.getPostKeyValueSeparators().getText());
			context.setPostParamParser(formStdParamParser);
			formStdParamParser.setContext(context);
		}
		
		context.setDataDrivenNodes(ddns);
		
		if (updateSiteStructure) {
			context.restructureSiteTree();
		}
	}
397947
public void removeExecutableFeature(EObject element, IModificationContext context) throws BadLocationException {
		final ICompositeNode node;
		final SarlAction action = EcoreUtil2.getContainerOfType(element, SarlAction.class);
		if (action == null) {
			final XtendMember feature = EcoreUtil2.getContainerOfType(element, XtendMember.class);
			node = NodeModelUtils.findActualNodeFor(feature);
		} else {
			node = NodeModelUtils.findActualNodeFor(action);
		}
		if (node != null) {
			remove(context.getXtextDocument(), node);
		}
	}
957210
private void clearTransientAndNonFaceletComponents(final FacesContext context, final UIComponent component)
    {
        //Scan children
        int childCount = component.getChildCount();
        if (childCount > 0)
        {
            for (int i = 0; i < childCount; i++)
            {
                UIComponent child = component.getChildren().get(i);
                if (child != null && child.isTransient() &&
                    child.getAttributes().get(ComponentSupport.MARK_CREATED) == null)
                {
                    component.getChildren().remove(i);
                    i--;
                    childCount--;
                }
                else
                {
                    if (child.getChildCount() > 0 || !child.getFacets().isEmpty())
                    {
                        clearTransientAndNonFaceletComponents(context, child);
                    }
                }
            }
        }

        //Scan facets
        if (component.getFacetCount() > 0)
        {
            Map<String, UIComponent> facets = component.getFacets();
            for (Iterator<UIComponent> itr = facets.values().iterator(); itr.hasNext();)
            {
                UIComponent fc = itr.next();
                if (fc != null && fc.isTransient() &&
                    fc.getAttributes().get(ComponentSupport.MARK_CREATED) == null)
                {
                    itr.remove();
                }
                else
                {
                    if (fc.getChildCount() > 0 || !fc.getFacets().isEmpty())
                    {
                        clearTransientAndNonFaceletComponents(context, fc);
                    }
                }
            }
        }
    }
900796
public static GeoLocationRequest getHttpServletRequestGeoLocationFromRequestContext(final RequestContext context) {
        val servletRequest = getHttpServletRequestFromExternalWebflowContext(context);
        return getHttpServletRequestGeoLocation(servletRequest);
    }
419542
@Override
    public UIComponent createComponent(ValueExpression componentExpression,
                                       FacesContext context,
                                       String componentType)
          throws FacesException {
        return getWrapped().createComponent(componentExpression, context, componentType);
    }