final IModel paramsModel = new PropertyModel(model, "connectionParameters");
FileParamPanel file;
if (useDirectoryChooser) {
file = new DirectoryParamPanel("url", new PropertyModel(model, "URL"),
new ResourceModel("url", "URL"), true);
} else {
file = new FileParamPanel("url", new PropertyModel(model, "URL"),
new ResourceModel("url", "URL"), true);
}