Search in sources :

Example 1 with XulFileDialog

use of org.pentaho.ui.xul.components.XulFileDialog in project pentaho-kettle by pentaho.

the class AuthProviderController method browse.

public void browse() {
    try {
        XulTextbox filename = (XulTextbox) document.getElementById("keytab");
        XulFileDialog dialog = (XulFileDialog) document.createElement("filedialog");
        XulFileDialog.RETURN_CODE retval = dialog.showOpenDialog();
        if (retval == XulFileDialog.RETURN_CODE.OK) {
            File file = (File) dialog.getFile();
            filename.setValue(file.getAbsolutePath());
        }
    } catch (XulException e) {
        log.logError(resourceBundle.getString("error.file_browse"), e);
    }
}
Also used : XulException(org.pentaho.ui.xul.XulException) XulTextbox(org.pentaho.ui.xul.components.XulTextbox) XulFileDialog(org.pentaho.ui.xul.components.XulFileDialog) File(java.io.File)

Aggregations

File (java.io.File)1 XulException (org.pentaho.ui.xul.XulException)1 XulFileDialog (org.pentaho.ui.xul.components.XulFileDialog)1 XulTextbox (org.pentaho.ui.xul.components.XulTextbox)1