Great thanx, I did such a session once, but am so busy responding in the forums that I never find the time to write some things about it. What a nice thing would be is to write an article on this for Javaworld once 3.2 is released (or maybe upfront?)
Did you also try to use different input types? Like a calendar from apache tomahawk? Or prefilling a listbox with values from one variable (or a some custom component) and store the selected one in a (another) variable? Those things do work now.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966697#3966697
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966697
is it possible to realize a file download via a portlet?
via servlet the code would look something like this:
response.setContentType ("text/plain");
response.setHeader ("Content-Disposition", "attachment; filename=\"testfile.txt\"");
ServletOutputStream op = response.getOutputStream ();
InputStream in = new FileInputStream(p_dir+request.getParameter("p_file"));
byte[] b = new byte[4 * 1024];
int len = 0;
while ((len = in.read(b)) != -1) {
op.write(b, 0, len);
}
in.close();
op.flush();
op.close();
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966689#3966689
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966689