Finished documenti management tab in contratto detail page. Solved
download problem (the trick being immediate=true).