@SuppressWarnings("unchecked")
public String upload() throws IOException {
FacesContext fc = FacesContext.getCurrentInstance();
VariableResolver vr = fc.getApplication().getVariableResolver();
DcWebImage wi = (DcWebImage) vr.resolveVariable(fc, "image");
byte[] b = uploadedFile.getBytes();
DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");
DcObject dco = wo.getDcObject();
dco.setValue(wi.getFieldIdx(), new DcImageIcon(b));