I tried to modify the view:
1 <span class="aui-field-element">
2 <% FileEntry userDocument_doc = PortletFileRepositoryUtil.getPortletFileEntry(testB.getUserDocumentA());
3 String userDocument_url = PortletFileRepositoryUtil.getPortletFileEntryURL(themeDisplay, userDocument_doc, StringPool.BLANK);
4 %>
5 <aui:a href="<%= userDocument_url %>" target="_blank"><img alt="" src="<%= userDocument_url %>" width="100"><%= testB.getTestBDescription() %></aui:a>
6</span>
but it does not work. An other thing is, if I define two fields of type document in my definition file like:
1<field>
2 <name>userDocumentA</name>
3 <title>Document A</title>
4 <type>
5 <document></document>
6 </type>
7 <showFieldInView>true</showFieldInView>
8 <required>false</required>
9 </field>
10<field>
11 <name>userDocumentB</name>
12 <title>Document B</title>
13 <type>
14 <document></document>
15 </type>
16 <showFieldInView>true</showFieldInView>
17 <required>false</required>
18 </field>
I got the failure "Your request failed to complete." by uploading files.