Package javax.faces.el

Examples of javax.faces.el.VariableResolver


        return security.isLoggedIn();
    }
   
    public SecuredUser getUser() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        Security security = (Security) vr.resolveVariable(fc, "security");
        return security.getUser();
    }
View Full Code Here


    public String open() {
        if (!isLoggedIn())
            return redirect();
       
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
       
        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        AdvancedFilter af = (AdvancedFilter) vr.resolveVariable(fc, "advancedFilter");

        af.initialize(objects.getModule());
       
        return current();
    }
View Full Code Here

    }
   
    public String addEntry() {
       
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        AdvancedFilter af = (AdvancedFilter) vr.resolveVariable(fc, "advancedFilter");
       
        DataFilterEntry entry = af.getEntry();
        if (entry.getOperator() == null) {
            fc.addMessage("msg", new FacesMessage("Operator is not filled!"));
        } else if (entry.getOperator().needsValue() && Utilities.isEmpty(entry.getValue())) {
View Full Code Here

        return current();
    }

    public String deleteEntry() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        AdvancedFilter af = (AdvancedFilter) vr.resolveVariable(fc, "advancedFilter");
        Map map = fc.getExternalContext().getRequestParameterMap();
        af.deleteEntry(Integer.parseInt((String) map.get("index")));
        return current();
    }
View Full Code Here

        return current();
    }

    public String editEntry() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        AdvancedFilter af = (AdvancedFilter) vr.resolveVariable(fc, "advancedFilter");
        Map map = fc.getExternalContext().getRequestParameterMap();
        af.editEntry(Integer.parseInt((String) map.get("index")));
        return current();
    }
View Full Code Here

        return current();
    }
   
    public String search() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        ItemSearch is = (ItemSearch) vr.resolveVariable(fc, "itemSearch");
        return is.search(true);
    }
View Full Code Here

       
        if (!isLoggedIn())
            return redirect();
       
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        List<?> data = (List<?>) objects.getData().getRowData();
       
        DcWebObject wod = (DcWebObject) vr.resolveVariable(fc, "webObject");
        int moduleIdx = objects.getModule();

        if (!getUser().isAuthorized(DcModules.get(moduleIdx)))
            return redirect();
View Full Code Here

        return getReturnTarget();
    }
   
    public String load() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebImages images = (DcWebImages) vr.resolveVariable(fc, "images");

        Map map = fc.getExternalContext().getRequestParameterMap();
        images.setCurrent(Integer.valueOf((String) map.get("fieldIdx")));
       
        return getReturnTarget();
View Full Code Here

        return getReturnTarget();
    }
   
    protected DcObject getItem() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        List<?> data = (List) objects.getData().getRowData();
       
        int moduleIdx = objects.getModule();
        return DataManager.getItem(moduleIdx, (String) data.get(data.size() - 1));
    }
View Full Code Here

   
    private void loadImages() {
        DcObject dco = getItem();

        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebImages images = (DcWebImages) vr.resolveVariable(fc, "images");
        images.clear();
       
        for (DcField field : dco.getFields()) {
            if (field.getFieldType() == ComponentFactory._PICTUREFIELD) {
                Picture picture = (Picture) dco.getValue(field.getIndex());
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.