Package net.datacrow.core.web.model

Examples of net.datacrow.core.web.model.DcWebObjects


            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


        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();

        wod.initialize(moduleIdx);
        wod.setRowIdx(objects.getData().getRowIndex());
        wod.setID((String) data.get(data.size() - 1));
        wod.setName(wod.getDcObject().toString());
        wod.load();
       
        DcObject dco = wod.getDcObject();
View Full Code Here

        try {
            dco.saveUpdate(false);
            wi.setPicture((Picture) dco.getValue(wi.getFieldIdx()));
            wo.load();
       
            DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
            objects.update(wo);
           
        } catch (ValidationException ve) {
            ve.printStackTrace();
        }
       
View Full Code Here

    }
   
    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

        wu.setSecuredUser(null);
       
        DcWebModules modules = (DcWebModules) vr.resolveVariable(fc, "modules");
        modules.load();
       
        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        objects.setModule(0);
       
        return "login";
    }
View Full Code Here

        List<NavigationMenuItem> menu = new ArrayList<NavigationMenuItem>();

        // edit
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
       
        if (getUser().isEditingAllowed(DcModules.get(objects.getModule()))) {
            NavigationMenuItem edit = getMenuItem(DcResources.getText("lblEdit"), null, null);
           
            new DcWebModule(objects.getModule(), "").getIcon16();
           
            edit.add(getMenuItem(DcResources.getText("lblCreateNew"), "#{itemDetails.create}", "modules/" + DcModules.get(objects.getModule()).getName().toLowerCase() + "16.png"));
            menu.add(edit);
        }
       
        addLogoffMenuItem(menu);
       
View Full Code Here

       
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        Map map = fc.getExternalContext().getRequestParameterMap();
       
        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        if (map.get("moduleId") != null && !map.get("moduleId").equals("")) {
            int moduleIdx = Integer.valueOf((String) map.get("moduleId"));
           
            if (getUser().isAuthorized(DcModules.get(moduleIdx))) {
                objects.setModule(moduleIdx);
                setFields(objects);
                setFilterFields(objects);
            } else {
                return redirect();
            }
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();

        wod.initialize(moduleIdx);
        wod.setRowIdx(objects.getData().getRowIndex());
        wod.setID((String) data.get(data.size() - 1));
        wod.setName(wod.getDcObject().toString());
        wod.load();
       
        return current();
View Full Code Here

        if (!isLoggedIn())
            return redirect();
       
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
       
        int moduleIdx = objects.getModule();
       
        if (!getUser().isAuthorized(DcModules.get(moduleIdx)))
            return redirect();
       
        DcWebObject wod = (DcWebObject) vr.resolveVariable(fc, "webObject");
View Full Code Here

    @Override
    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

TOP

Related Classes of net.datacrow.core.web.model.DcWebObjects

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.