Search in sources :

Example 6 with Attachment

use of org.activityinfo.model.type.attachment.Attachment in project activityinfo by bedatadriven.

the class AttachmentWidget method setValue.

public void setValue(AttachmentValue value) {
    if (value != null && value.getValues() != null && value.getValues().size() > 0) {
        rows.clear();
        for (Attachment rowValue : value.getValues()) {
            addNewRow(rowValue);
        }
        setState(true);
    } else {
        clear();
    }
}
Also used : Attachment(org.activityinfo.model.type.attachment.Attachment)

Aggregations

Attachment (org.activityinfo.model.type.attachment.Attachment)6 AttachmentValue (org.activityinfo.model.type.attachment.AttachmentValue)2 IOException (java.io.IOException)1 BodyPart (javax.mail.BodyPart)1 MessagingException (javax.mail.MessagingException)1 JsonValue (org.activityinfo.json.JsonValue)1 FormClass (org.activityinfo.model.form.FormClass)1 FormInstance (org.activityinfo.model.form.FormInstance)1 KeyGenerator (org.activityinfo.model.legacy.KeyGenerator)1 ResourceId (org.activityinfo.model.resource.ResourceId)1 AttachmentType (org.activityinfo.model.type.attachment.AttachmentType)1 LocalDate (org.activityinfo.model.type.time.LocalDate)1 OnDataSet (org.activityinfo.server.database.OnDataSet)1 XFormInstanceImpl (org.activityinfo.server.endpoint.odk.xform.XFormInstanceImpl)1 BlobId (org.activityinfo.store.spi.BlobId)1 Test (org.junit.Test)1