Package net.datacrow.core.web.model

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


        Map map = fc.getExternalContext().getRequestParameterMap();
        int fieldIdx = Integer.valueOf((String) map.get("fieldIdx"));
        isChild = Boolean.valueOf((String) map.get("isChild"));
       
        DcWebObject wod = getParentObject();
        DcReferences references = (DcReferences) vr.resolveVariable(fc, "references");

        references.setFieldIdx(fieldIdx);
        references.setModuleIdx(wod.getModule());

        setCurrentReferences(wod, references, fieldIdx);
        setListItems(wod, references, fieldIdx);
       
        return current();
View Full Code Here


        if (!isLoggedIn())
            return redirect();
       
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcReferences references = (DcReferences) vr.resolveVariable(fc, "references");
       
        String[] keys = references.getKeys();
       
        DcWebObject wod = getParentObject();
        DcObject dco = wod.getDcObject();
        dco.setValue(references.getFieldIdx(), null);

        int referenceModIdx = dco.getField(references.getFieldIdx()).getReferenceIdx();
        for (String key : keys) {
            DcObject reference = DataManager.getItem(referenceModIdx, key);
            DataManager.createReference(dco, references.getFieldIdx(), reference);
        }
       
        try {
            dco.saveUpdate(false);
        } catch (ValidationException ve) {
View Full Code Here

TOP

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

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.