use of org.rstudio.core.client.widget.FileChooserTextBox in project rstudio by rstudio.
the class ProjectTemplateWidget method fileInput.
private ProjectTemplateWidgetItem fileInput(final ProjectTemplateWidgetDescription description) {
final FileChooserTextBox widget = new FileChooserTextBox(description.getLabel(), null);
String defaultValue = description.getDefault();
if (!StringUtil.isNullOrEmpty(defaultValue))
widget.setText(defaultValue);
return new ProjectTemplateWidgetItem(widget, new Collector() {
@Override
public void collectInput(JsObject receiver) {
String value = widget.getText();
receiver.setString(description.getParameter(), value);
}
});
}
Aggregations