Package net.datacrow.core.web.model

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


    }
   
    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


    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());
               
                if (picture == null) continue;
               
                picture.loadImage(false);
                if (picture.getValue(Picture._D_IMAGE) != null) {
                    DcWebImage wi = new DcWebImage();
                    wi.setFieldIdx(field.getIndex());
                    wi.setModuleIdx(field.getModule());
                    wi.setPicture(picture);
                    images.add(wi);
                }
            }
        }
    }
View Full Code Here

TOP

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

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.