Francis Mariano
08/16/2022, 12:53 PMRobert Jaros
08/16/2022, 12:56 PMRobert Jaros
08/16/2022, 12:57 PMRobert Jaros
08/16/2022, 12:57 PMRobert Jaros
08/16/2022, 12:57 PMUpload component to implement this.Robert Jaros
08/16/2022, 12:58 PMRobert Jaros
08/16/2022, 12:59 PMFrancis Mariano
08/16/2022, 1:02 PMFrancis Mariano
08/16/2022, 2:07 PMRobert Jaros
08/16/2022, 2:21 PMuploadInput(uploadUrl = "/", multiple = true) {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
}Francis Mariano
08/16/2022, 2:28 PMshowCaption = falseFrancis Mariano
08/17/2022, 1:15 PMformPanel {
add(HPanel(spacing = 3, alignItems = AlignItems.CENTER) {
width = 80.perc
add(Form::upload01, Upload("/", multiple = false).apply {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
explorerTheme = true
dropZoneEnabled = true
allowedFileExtensions = setOf("csv")
})
add(Form::upload02, Upload("/", multiple = false).apply {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
explorerTheme = true
dropZoneEnabled = true
allowedFileExtensions = setOf("csv")
})
})Francis Mariano
08/17/2022, 1:16 PMformPanel {
hPanel(spacing = 3, alignItems = AlignItems.CENTER) {
width = 80.perc
add(Form::upload01, Upload("/", multiple = false).apply {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
explorerTheme = true
dropZoneEnabled = true
allowedFileExtensions = setOf("csv")
})
add(Form::upload02, Upload("/", multiple = false).apply {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
explorerTheme = true
dropZoneEnabled = true
allowedFileExtensions = setOf("csv")
})
}
}Francis Mariano
08/17/2022, 1:16 PMFrancis Mariano
08/17/2022, 1:20 PMFrancis Mariano
08/17/2022, 1:20 PMhPanel(spacing = 3) {
formPanel {
add(Form::upload0, Upload("/", multiple = false).apply {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
explorerTheme = true
dropZoneEnabled = true
allowedFileExtensions = setOf("csv")
})
}
formPanel {
add(Form::upload0, Upload("/", multiple = false).apply {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
explorerTheme = true
dropZoneEnabled = true
allowedFileExtensions = setOf("csv")
})
}
}Robert Jaros
08/17/2022, 6:10 PMRobert Jaros
08/17/2022, 6:10 PMFormPanel.add() you can't control the layout.Robert Jaros
08/17/2022, 6:11 PMbind() your form controls to your data model. It would be something like this:Robert Jaros
08/17/2022, 6:17 PMformPanel {
hPanel {
upload(uploadUrl = "/", multiple = true) {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
}.bind(Form::upload1)
upload(uploadUrl = "/", multiple = true) {
showBrowse = false
showCancel = false
showRemove = false
showUpload = false
showCaption = false
}.bind(Form::upload2)
}
}Robert Jaros
08/17/2022, 6:19 PMadd() anymore (I looks a lot cleaner with bind() for me), but it's still there for compatibility.Francis Mariano
08/17/2022, 6:30 PMbind() is cleaner. You are incredible.