Package javax.faces.el

Examples of javax.faces.el.VariableResolver


        if (event.getPhaseId() == PhaseId.INVOKE_APPLICATION)
        {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            UIComponent component = event.getComponent();

            VariableResolver vr = facesContext.getApplication().getVariableResolver();
            QuotationForm form = (QuotationForm)vr.resolveVariable(facesContext, "q_form");
            if (component.getId().equals("button1"))
            {
                form.quote();
            }
            else
View Full Code Here


                                                    String bundleName)
    {
        //TODO: Could be JSTL LocalizationContext bundle?

        //Lookup as attribute (try different scopes)
        VariableResolver vr = facesContext.getApplication().getVariableResolver();
        ResourceBundle bundle = (ResourceBundle)vr.resolveVariable(facesContext, bundleName);

        return bundle;
    }
View Full Code Here

  /**
   * Returns the requested object configured in the faces-config or from library.
   */
  public static Object resolveVariable(FacesContext context, String variable) {
    Application application = context.getApplication();
    VariableResolver variableResolver = application.getVariableResolver();
    return variableResolver.resolveVariable(context, variable);
  }
View Full Code Here

     */
    @SuppressWarnings("deprecation")
    public static VariableResolver getDelegateVR(ApplicationAssociate associate,
                                                 boolean provideDefault) {

        VariableResolver vr = associate.getLegacyVariableResolver();
        if (vr == null) {
            vr = associate.getLegacyVRChainHead();
            if (vr == null && provideDefault) {
                vr = new ChainAwareVariableResolver();
            }
View Full Code Here

    @SuppressWarnings("deprecation")
    private static void addVariableResolvers(FacesCompositeELResolver target,
                                             FacesCompositeELResolver.ELResolverChainType chainType,
                                             ApplicationAssociate associate) {

        VariableResolver vr = getDelegateVR(associate, true);
        if (vr != null) {
            VariableResolverChainWrapper vrChainWrapper = new VariableResolverChainWrapper(vr);
            target.addRootELResolver(vrChainWrapper);
            if (chainType == FacesCompositeELResolver.ELResolverChainType.JSP) {
                associate.setLegacyVRChainHeadWrapperForJsp(vrChainWrapper);
View Full Code Here

        }
    }

    public void installProgrammaticallyAddedResolvers() {
        // Ensure custom resolvers are inserted at the correct place.
        VariableResolver vr = this.getLegacyVariableResolver();
        if (null != vr) {
            assert(null != this.getLegacyVRChainHeadWrapperForJsp());
            this.getLegacyVRChainHeadWrapperForJsp().setWrapped(vr);
            assert(null != this.getLegacyVRChainHeadWrapperForFaces());
            this.getLegacyVRChainHeadWrapperForFaces().setWrapped(vr);
View Full Code Here

                                                    String bundleName)
    {
        //TODO: Could be JSTL LocalizationContext bundle?

        //Lookup as attribute (try different scopes)
        VariableResolver vr = facesContext.getApplication().getVariableResolver();
        ResourceBundle bundle = (ResourceBundle)vr.resolveVariable(facesContext, bundleName);

        return bundle;
    }
View Full Code Here

    public void processAction(ActionEvent event) throws AbortProcessingException
    {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        UIComponent component = event.getComponent();

        VariableResolver vr = facesContext.getApplication().getVariableResolver();
        CalcForm form = (CalcForm)vr.resolveVariable(facesContext, "calcForm");
        if (component.getId().equals("addButton") ||
            component.getId().equals("href1"))
        {
            form.add();
        }
View Full Code Here

    public void processAction(ActionEvent event) throws AbortProcessingException
    {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        UIComponent component = event.getComponent();

        VariableResolver vr = facesContext.getApplication().getVariableResolver();
        UCaseForm form = (UCaseForm)vr.resolveVariable(facesContext, "ucaseForm");
        if (component.getId().equals("ucaseButton"))
        {
            form.uppercase();
        }
        else
View Full Code Here

        if (event.getPhaseId() == PhaseId.INVOKE_APPLICATION)
        {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            UIComponent component = event.getComponent();

            VariableResolver vr = facesContext.getApplication().getVariableResolver();
            QuotationForm form = (QuotationForm)vr.resolveVariable(facesContext, "q_form");
            if (component.getId().equals("button1"))
            {
                form.quote();
            }
            else
View Full Code Here

TOP

Related Classes of javax.faces.el.VariableResolver

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.