UpdateDocumentContent.jsp Sample
This topic inludes the source code for the UpdateDocumentContent.jsp Sample.
Sample Location
This sample is located in the following directory in your WebLogic Workshop installation:
BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/handlingData/binaryFlow/
Sample Source Code
01 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
02 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
03 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
04 <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
05 <%
06 response.setHeader( "Pragma", "No-cache" );
07 response.setHeader( "Cache-Control", "no-cache" );
08 response.setHeader( "Expires", "1" );
09 %>
10 <netui-template:template templatePage="/resources/jsp/grid_template.jsp">
11 <netui-template:setAttribute value="Edit View" name="title"/>
12 <netui-template:section name="bodySection">
13 <blockquote>
14 <span class="pagehead">
15 <netui:label value="test - Edit View"/>
16 </span>
17 <br/>
18 <netui:form action="submitUpdate" enctype="multipart/form-data">
19 <netui:parameterMap map="{pageFlow.sortFilterService.rowIdQueryParamsMap}"/>
20 <table>
21 <tr class="tablebody">
22 <td>Id:</td>
23 <td>
24 <netui:content value="{actionForm.id}"/>
25 </td>
26 </tr>
27 <tr class="tablebody">
28 <td>Versioned_object_id: <font style="color:#ff0000;">[required
29 field: any integer]</font></td>
30 <td>
31 <netui:textBox dataSource="{actionForm.versioned_object_id}"/>
32 </td>
33 </tr>
34 <tr class="tablebody">
35 <td>Object_type: <font style="color:#ff0000;">[required
36 field: any string]</font></td>
37 <td>
38 <netui:textBox dataSource="{actionForm.object_type}"/>
39 </td>
40 </tr>
41 <tr class="tablebody">
42 <td>Name:</td>
43 <td>
44 <netui:textBox dataSource="{actionForm.name}"/>
45 </td>
46 </tr>
47 <tr class="tablebody">
48 <td>Content_type:</td>
49 <td>
50 <netui:textBox dataSource="{actionForm.content_type}"/>
51 </td>
52 </tr>
53 <tr class="tablebody">
54 <td>Containment_of_content: <font style="color:#ff0000;">[required
55 field: any integer]</font></td>
56 <td>
57 <netui:textBox dataSource="{actionForm.containment_of_content}"/>
58 </td>
59 </tr>
60 <tr class="tablebody">
61 <td>Current Content:</td>
62 <td>
63 <netui:image src="/WebApp/handlingData/binaryFlow/showImage.jsp?photoid={request.databaseForm.id}"/>
64 </td>
65 </tr>
66 <tr class="tablebody">
67 <td>Update Content: <font style="color:#ff0000;">Upload a binary image file: GIF, JPG, BMP</font></td>
68 <td>
69 <netui:fileUpload dataSource="{actionForm.contentUp}"/>
70 </td>
71 </tr>
72 <tr class="tablebody">
73 <td>File_size:</td>
74 <td>
75 <netui:textBox dataSource="{actionForm.file_size}"/>
76 </td>
77 </tr>
78 <tr class="tablebody">
79 <td>File_last_modified:</td>
80 <td>
81 <netui:textBox dataSource="{actionForm.file_last_modified}"/>
82 </td>
83 </tr>
84 </table>
85 </br>
86 <netui:imageButton src="/WebApp/resources/images/update.gif"/>
87
88 <netui:imageAnchor action="cancelUpdate" border="0" src="/WebApp/resources/images/cancel.gif">
89 <netui:parameterMap map="{pageFlow.sortFilterService.queryParamsMap}"/>
90 </netui:imageAnchor>
91 </netui:form>
92 </blockquote>
93 </netui-template:section>
94 <netui-template:section name="navBackSection">
95 <hr>
96 <p><netui:anchor href="/WebApp/handlingData/handlingDataController.jpf">
97 Back to Handling Data Samples</netui:anchor>
98 </netui-template:section>
99 </netui-template:template>
|