scala - How to delete list of files using checkbox in play framework? -


i new play framework , have list of files , wanna add check box can delete checked files on clicking delete button, displaying list of files using scala language, needed

  @form(action = routes.application.delete, 'enctype -> "multipart/form-data") {      @for(order1 <- listfiles) {      @if(order1.isdirectory()) { }      else {                      <input type="checkbox" name="@order1">@order1.getname()     }   }   <input type="submit" name="delete">   } 

where @order1.getname() name of file

you need pass them array of params, take @ nico_ekito's answer find how can access them in controller.

optionally can use ie. javascript join filenames/identifiers 1 comma-separated string , split in controller list<string> maybe easier.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

html - Repeat image to extend header to fill screen -

javascript - Backbone.js getting target attribute -