Changeset 4454


Ignore:
Timestamp:
Mar 20, 2013, 9:20:05 AM (10 years ago)
Author:
olle
Message:

Refs #800. Removal of files from biomaterial implemented for extracts and labeled extracts.

Location:
trunk/client/servlet/src/org/proteios/action/extract
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/extract/ViewActiveExtract.java

    r4161 r4454  
    3939import org.proteios.action.file.AnnotateBioMaterial;
    4040import org.proteios.action.file.ViewFile;
     41import org.proteios.action.sample.RemoveFilesFromBioMaterial;
    4142import org.proteios.action.write.AddAnnotation;
    4243import org.proteios.core.Annotation;
     
    199200        Iterator<File> fileit = extract.getFiles().iterator();
    200201        fileTable.setTitle("AssociatedFiles");
     202        fileTable.add(new Column<Checkbox<VInteger>>(""));
    201203        fileTable.add(new Column<String>("Name"));
    202204        fileTable.add(new Column<String>("Type"));
     
    205207            file = fileit.next();
    206208            row = new Row(file.getId());
     209            Checkbox<VInteger> cb = new Checkbox<VInteger>(RemoveFilesFromBioMaterial.VFILEID);
     210            cb.setValue(file.getId());
     211            Cell<Checkbox<VInteger>> chk = new Cell<Checkbox<VInteger>>(cb);
     212            row.addCell(chk);
    207213            Cell<?> nameCell = new Cell<String>(file.getName());
    208214            ActionLink viewFile = getActionFactory().getActionLink(
     
    234240        fileLink.addParameter(AnnotateBioMaterial.VBIOMATERIALID, extract.getId());
    235241        tbf.add(fileLink);
     242        ActionLink al = getActionFactory().getActionLink(
     243            RemoveFilesFromBioMaterial.class, "Remove");
     244        al.addParameter(RemoveFilesFromBioMaterial.VBIOMATERIALID, extract.getId());
     245        tbf.add(al);
    236246        /***********************************************************************
    237247            * Layout
  • trunk/client/servlet/src/org/proteios/action/extract/ViewActiveLabeledExtract.java

    r4161 r4454  
    3838import org.proteios.action.file.AnnotateBioMaterial;
    3939import org.proteios.action.file.ViewFile;
     40import org.proteios.action.sample.RemoveFilesFromBioMaterial;
    4041import org.proteios.action.write.AddAnnotation;
    4142import org.proteios.core.Annotation;
     
    161162        Iterator<File> fileit = extract.getFiles().iterator();
    162163        fileTable.setTitle("AssociatedFiles");
     164        fileTable.add(new Column<Checkbox<VInteger>>(""));
    163165        fileTable.add(new Column<String>("Name"));
    164166        fileTable.add(new Column<String>("Type"));
     
    167169            File file = fileit.next();
    168170            Row row = new Row(file.getId());
     171            Checkbox<VInteger> cb = new Checkbox<VInteger>(RemoveFilesFromBioMaterial.VFILEID);
     172            cb.setValue(file.getId());
     173            Cell<Checkbox<VInteger>> chk = new Cell<Checkbox<VInteger>>(cb);
     174            row.addCell(chk);
    169175            Cell<?> nameCell = new Cell<String>(file.getName());
    170176            ActionLink viewFile = getActionFactory().getActionLink(
     
    188194        fileLink.addParameter(AnnotateBioMaterial.VBIOMATERIALID, extract.getId());
    189195        tbf.add(fileLink);
     196        ActionLink al = getActionFactory().getActionLink(
     197            RemoveFilesFromBioMaterial.class, "Remove");
     198        al.addParameter(RemoveFilesFromBioMaterial.VBIOMATERIALID, extract.getId());
     199        tbf.add(al);
    190200        /** Disable buttons according to permissions **/
    191201            try
Note: See TracChangeset for help on using the changeset viewer.