Package javax.faces.el

Examples of javax.faces.el.VariableResolver.resolveVariable()


    protected String afterUpdated() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();

        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");

        objects.update(wo);
        return back();
    }
View Full Code Here


    @Override
    protected String afterCreate() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();

        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");

        objects.add(wo);
        return current();
    }
View Full Code Here

    protected String afterCreate() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();

        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");

        objects.add(wo);
        return current();
    }
}
View Full Code Here

   
    @Override
    protected DcObject getItem() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");
        return wo.getDcObject();
    }
}
View Full Code Here

    {
        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

    {
        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

{
    public String changeLocale()
    {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        VariableResolver vr = facesContext.getApplication().getVariableResolver();
        OptionsForm form = (OptionsForm)vr.resolveVariable(facesContext, "optionsForm");
        facesContext.getViewRoot().setLocale(form.getLocale());
        return "ok";
    }
}
View Full Code Here

        {
            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

    {
        //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;
    }

    public static String getString(FacesContext facesContext,
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);
  }

  /**
   * Returns the ClientProperties object configured in the faces-config.
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.