Class FileAttachmentUICustomWidgetFactory
java.lang.Object
com.apgar.common.lib.ui.widget.fileattachmentwidget.FileAttachmentUICustomWidgetFactory
- All Implemented Interfaces:
UIWidgetFactory<FileAttachmentUICustomWidget>
public class FileAttachmentUICustomWidgetFactory
extends Object
implements UIWidgetFactory<FileAttachmentUICustomWidget>
Factory class for creating instances of
FileAttachmentUICustomWidget.
This factory implements UIWidgetFactory and is responsible for instantiating and setting up FileAttachmentUICustomWidget,
which allows file attachment on a field within a form.
This class is defined as follows under the attachment field in the XSD.
<xs:element name="attachmentField" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en-US">
<osd:label>Attachment Field</osd:label>
</xs:documentation>
<xs:appinfo>
<osd:defaultView>
<widget osd:class="com.apgar.common.lib.ui.widget.fileattachmentwidget.FileAttachmentUICustomWidgetFactory">
<servletPath>/YourProject/FileUploadDownloadServlet</servletPath>
<fileUploadDirectory>/YourProject/FileUploadDownloadServlet</fileUploadDirectory>
</widget>
</osd:defaultView>
</xs:appinfo>
</xs:annotation>
</xs:element>
- Author:
- APGAR Consulting
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance(WidgetFactoryContext context) Creates a new instance ofFileAttachmentUICustomWidgetusing the providedWidgetFactoryContext.voidsetFileUploadDirectory(String fileUploadDirectory) Sets the variable for the path of the file upload directory in your projectvoidsetServletPath(String servletPath) Sets the variable for the path of theFileUploadDownloadServletin your projectvoidsetup(WidgetFactorySetupContext context) Sets up theFileAttachmentUICustomWidgetFactoryduring its initialization phase.
-
Constructor Details
-
FileAttachmentUICustomWidgetFactory
public FileAttachmentUICustomWidgetFactory()
-
-
Method Details
-
newInstance
Creates a new instance ofFileAttachmentUICustomWidgetusing the providedWidgetFactoryContext.- Specified by:
newInstancein interfaceUIWidgetFactory<FileAttachmentUICustomWidget>- Parameters:
context- the context providing information necessary for widget creation, including the path to the field that this widget will represent- Returns:
- a new instance of
FileAttachmentUICustomWidgetassociated with the specified path
-
setup
Sets up theFileAttachmentUICustomWidgetFactoryduring its initialization phase.- Specified by:
setupin interfaceUIWidgetFactory<FileAttachmentUICustomWidget>- Parameters:
context- the setup context providing additional information and services that may be used during the factory's setup
-
setServletPath
Sets the variable for the path of theFileUploadDownloadServletin your project- Parameters:
servletPath- String
-
setFileUploadDirectory
Sets the variable for the path of the file upload directory in your project- Parameters:
fileUploadDirectory- String
-