Implementation of the attachment function (see ewell.webclient.beans.warranty.WarrantysDateBean, ewell.webclient.beans.doclinks.custom.AddDocLinksCustomBean, ewell.webclient.beans.doclinks.custom.ViewAttachmentsCustomBean)
Attachment browsing needs to configure the attachment service in weblogic. Create a new WEB-INF folder in the C port doclinks folder. Copy the web.xml file in the C:\ibm\SMP\maximo\deployment path and install it in weblogic. Upload: If you use it in the main table, you only need to add a doclinks relationship to the main table.
If you use the attachment control in the word table, copy the attachment dialog in the library.xml and view the attachment's dialog into your own application and delete savemode="ONLOAD".
Then bind your own DdataBean, or upload the attachment in a new line will fail to bind the doclinks table and the attachment will not be visible.
Here are the steps you have written in conjunction with your experience:
1. Create a DOCLINKS association in the child table object;
2, in the application must add associated files, management libraries, etc. in the selection operation (recommended with reference to the purchase order application);
3. Copy the upload attachment dialog and view attachment dialog in LIBRARY.XML in the application to the xml of the current application. The specific copied dialo is as follows (search for the corresponding dialog in library.xml according to id):
<dialog beanclass="psdi.webclient.beans.emailstner.CreateInbCommBean" id="CREATEINBCOMM" label="Create Communication" relationship="COMMLOG">
<helpgrid id="inbcreatecomm_help" innerhtml="To create a communication, select a template or enter the message and details directly."/>
<section border="true" id="inbcreatecomm_grid1">
<sectionrow id="inbcreatecomm_row1">
<sectioncol id="inbcreatecomm_col1">
<section id="inbcreatecomm_grid2">
<textbox applink="commtmplt" dataattribute="TEMPLATEID" id="inbcreatecomm_grid1_1" lookup="commtmplt" menutype="COMMLOGTMPLTID" ondatachange="resetchildren"/>
<textbox dataattribute="sendto" id="inbcreatecomm_grid1_3" lookup="SELECTRECIPIENTS"/>
<textbox dataattribute="cc" id="inbcreatecomm_grid1_4"/>
<textbox dataattribute="bcc" id="inbcreatecomm_grid1_5"/>
</section>
</sectioncol>
<sectioncol id="inbcreatecomm_col2">
<section border="false" id="inbcreatecomm_grid5">
<blankline id="inbcreatecomm_grid1_0"/>
<textbox dataattribute="sendfrom" id="inbcreatecomm_grid1_2"/>
<textbox dataattribute="replyto" id="inbcreatecomm_grid1_6"/>
</section>
</sectioncol>
</sectionrow>
</section>
<section id="inbcreatecomm_row2_col1_sec1">
<textbox dataattribute="subject" id="inbcreatecomm_grid1_7"/>
<richtexteditor columns="60" dataattribute="message" id="inbcreatecomm_grid1_8" rows="8"/>
<buttongroup id="inbcreatecomm_msg_btngrp">
<pushbutton id="inbcreatecomm_gride1_10" label="reset" mxevent="resetvalue" targetid="createcomm_grid1_8"/>
<pushbutton id="inbcreatecomm_gride1_11" label="clear" mxevent="clearvalue"/>
</buttongroup>
</section>
<datasrc beanclass="psdi.webclient.beans.doclinks.DocLinksBean" id="inbcreatecomm_attachments_src" parentdatasrc="CREATECOMM" relationship="DOCLINKS"/>
<table beanclass="psdi.webclient.beans.doclinks.DocLinksBean" datasrc="commlog_attachments_src" description="Click one of the buttons below to add an attachment to your communication." id="inbattachments" inputmode="readonly" Label="attachment" orderby="ownertable, doctype" relationship="DOCLINKS">
<tablebody displayrowsperpage="5" filterable="false" filterexpanded="false" id="inbattachments_tablebody">
<tablecol dataattribute="document" id="inbattachments_tablebody_2" type="openurl" urlattribute="weburl"/>
<tablecol dataattribute="docinfo.description" id="inbattachments_tablebody_3"/>
<tablecol filterable="false" id="inbattachments_tablebody_5" mxevent="toggledeleterow" mxevent_desc="Mark the line to delete" mxevent_icon="btn_garbage.gif" sortable="false" type="event"/>
</tablebody>
<buttongroup id="inbattachments_grid7">
<pushbutton id="inbattachments_grid7_2" label="attached file" mxevent="ssaddnewattachmentfile"/>
<pushbutton id="inbattachments_grid7_3" label="Add a Web Page" mxevent="ssaddnewattachmentwww"/>
</buttongroup>
</table>
<buttongroup id="inbcreatecomm_grid3">
<pushbutton default="true" id="inbcreatecomm_grid3_1" label="send" mxevent="sendmessage"/>
<pushbutton id="inbcreatecomm_grid3_2" label="cancel" mxevent="docancel"/>
</buttongroup>
</dialog>
<dialog beanclass="psdi.webclient.beans.doclinks.AddDocLinksBean" id="addnewattachmentfile" label="Create file attachments" relationship="DOCLINKS" >
<helpgrid id="addnewattachmentfile_help" innerhtml="Only files in the following format can be printed: .pdf, .xls, .csv, .txt, .doc, .gif, .jpg, .ppt. If the attached file does not belong to these Format, clear the check box next to the "Print report and attached documents (if printable type)" option (advanced option)."/>
<defaultvalue dataattribute="urltype" id="addnewattachments_file_d1" value="!FILE!"/>
<section id="addnewattachments_file_1">
<combobox dataattribute="doctype" displayattribute="doctype" id="addnewattachments_file_1_2" label="Select folder"/>
<attachdoc id="addnewattachments_file_1_8" label="Specify the file"/>
<multiparttextbox dataattribute="document" descdataattribute="description" id="addnewattachments_file_1_4" label="name the document"/>
</section>
<section id="addnewattachments_file_2" label="Advanced Options">
<checkbox dataattribute="upload" id="addnewattachments_file_2_row2_col1_1_1" label="Copy the document to the default location set by the administrator (recommended location)."/>
<checkbox dataattribute="show" id="addnewattachments_file_2_row3_col1_1_1" label="Add documents to the document library for others to use"/>
<checkbox dataattribute="printthrulink" id="addnewattachments_file_2_1" label="Print the report and accompanying documents (if it is a printable type)"/>
</section>
<buttongroup id="addnewattachments_file_3">
<doclinkuploadbutton default="true" id="addnewattachments_file_3_1" label="OK"/>
<pushbutton id="addnewattachments_file_3_2" label="cancel" mxevent="dialogcancel"/>
</buttongroup>
</dialog>
<dialog bEanclass="psdi.webclient.beans.doclinks.AddAttachmentsBean" id="ssaddnewattachmentfile" label="Create file attachment" relationship="DOCLINKS">
<defaultvalue dataattribute="urltype" id="ssaddnewattachments_file_d1" value="!FILE!"/>
<section id="ssaddnewattachments_file_1">
<multiparttextbox dataattribute="document" descdataattribute="description" id="ssaddnewattachments_file_1_4" label="name"/>
<attachdoc id="ssaddnewattachments_file_1_8" label="Specify the file:"/>
</section>
<buttongroup id="ssaddnewattachments_file_2">
<doclinkuploadbutton default="true" id="ssaddnewattachments_file_2_1" label="OK"/>
<pushbutton id="ssaddnewattachments_file_2_2" label="cancel" mxevent="dialogcancel"/>
</buttongroup>
</dialog>
<dialog beanclass="psdi.webclient.beans.doclinks.AddDocLinksDrBean" id="draddnewattachmentfile" label="Create file attachments" relationship="DOCLINKS">
<helpgrid id="draddnewattachmentfile_help" innerhtml="Only files in the following format can be printed: .pdf, .xls, .csv, .txt, .doc, .gif, .jpg, .ppt. If the attached file does not belong to these Format, clear the check box next to "Print report and attached documents (if printable type)" (advanced option)."/>
<defaultvalue dataattribute="urltype" id="draddnewattachments_file_d1" value="!FILE!"/>
<section id="draddnewattachments_file_1">
<combobox dataattribute="doctype" displayattribute="doctype" id="draddnewattachments_file_1_2" label="Select folder"/>
<attachdoc id="draddnewattachments_file_1_8" label="specify file"/>
<multiparttextbox dataattribute="document" descdataattribute="description" id="draddnewattachments_file_1_4" label="name the document"/>
</section>
<section id="draddnewattachments_file_2" label="Advanced Options">
<checkbox dataattribute="upload" id="draddnewattachments_file_2_row2_col1_1_1" label="Copy the document to the default location set by the administrator (recommended location)."/>
<checkbox dataattribute="show" id="draddnewattachments_file_2_row3_col1_1_1" label="Add documents to the document library for others to use"/>
<checkbox dataattribute="printthrulink" id="draddnewattachments_file_2_1" label="print report and accompanying documents (if printable type)"/>
</section>
<buttongroup id="draddnewattachments_file_3">
<doclinkuploadbutton default="true" id="draddnewattachments_file_3_1" label="OK"/>
<pushbutton id="draddnewattachments_file_3_2" label="cancel" mxevent="dialogcancel"/>
</buttongroup>
</dialog>