/** ************************************************************************ Load File */ private void cmd_loadFile() { Media media = null; try { media = Fileupload.get(); } catch (InterruptedException e) { e.printStackTrace(); } if (media == null) return; if (media.isBinary()) { m_file_istream = media.getStreamData(); } else { ListItem listitem = fCharset.getSelectedItem(); if (listitem == null) { m_file_istream = new ReaderInputStream(media.getReaderData()); } else { Charset charset = (Charset) listitem.getValue(); m_file_istream = new ReaderInputStream(media.getReaderData(), charset.name()); } } log.config(media.getName()); bFile.setLabel(media.getName()); cmd_reloadFile(); }
@Listen("onClick = #label2") public void upload2() { Fileupload.get(3); }
@Listen("onClick = #label1") public void upload() { Fileupload.get(); }