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