Link component

Here I need a component which can show the link of filesourse. When people click the link, then it will download the file from server side.


Now I am using LINK component to do that, new Link (“link to a resource”,new ExternalResource(“attachment/ticket/1/file.log”))

Then I got the erro message, Requested resource [ITMILL/widgetsets/com.itmill.toolkit.terminal.gwt.DefaultWidgetSet/attachments/ticket/1/file.log]
not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/ITMILL folder.

So my question is which component can do that, and how


Link component is correct, but you should use FileResource instead of ExternalResource. See for more infoa about resources.

ExternalResource is for resources that are not served ‘internally’ by IT Mill Toolkit; if this is the case for your resource, you should give an absolute path to ExternalResource, not a relative, e.g ExternalResource(“/attachment/ticket/1/file.log”) or ExternalResource(“”).

But as someone said, FileResource might be what you’re looking for.

Best Regards,