Class HighlightChangesWidgetFactory
java.lang.Object
com.apgar.common.lib.ui.widget.highlightwidget.HighlightChangesWidgetFactory
- All Implemented Interfaces:
com.orchestranetworks.ui.form.widget.UIWidgetFactory<com.orchestranetworks.ui.form.widget.UIWidget>
public abstract class HighlightChangesWidgetFactory
extends Object
implements com.orchestranetworks.ui.form.widget.UIWidgetFactory<com.orchestranetworks.ui.form.widget.UIWidget>
Factory Class for
HighlightChangesWidget
This class is defined in the XSD under the field for which the HighlightChangesWidget is drawn.
Parameters ending with "BooleanValue" should be replaced by a Boolean value from the set {"true/false", "t/f", "yes/no", "y/n", "on/off"}.
<xs:element name="sampleField" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation xml:lang="en-US">
<osd:label>Sample Field</osd:label>
</xs:documentation>
<xs:appinfo>
<osd:defaultView>
<widget osd:class="com.apgar.common.lib.ui.widget.highlightwidget.HighlightChangesWidgetFactory">
<isMaster>isMasterBooleanValue</isMaster>
<fkInAssociation>fkInAssociationBooleanValue</fkInAssociation>
<isReadOnly>isReadOnlyBooleanValue</isReadOnly>
<isReadOnlyOnCondition>isReadOnlyOnConditionBooleanValue</isReadOnlyOnCondition>
<readOnlyCondition>readOnlyConditionVerifiedValue</readOnlyCondition>
<isCustomWidget>isCustomWidgetBooleanValue</isCustomWidget>
<customWidgetModuleName>customWidgetModuleName</customWidgetModuleName>
<customWidgetClass>com.project.ui.widget.custominstance.customWidgetClass<customWidgetClass>
<customWidgetParams>{customWidgetParams}</customWidgetParams>
<isLinkToRecord>isLinkToRecordBooleanValue</isLinkToRecord>
<linkToRecordBranch>recordBranch</linkToRecordBranch>
<linkToRecordContainer>recordContainer</linkToRecordContainer>
<linkToRecordTablePath>./recordTablePath</linkToRecordTablePath>
<linkToRecordKeyFieldPath>./linkToRecordKeyFieldPath</linkToRecordKeyFieldPath>
<fieldOnChangeJSMethod>fieldOnChangeJSMethod</fieldOnChangeJSMethod>
</widget>
</osd:defaultView>
</xs:appinfo>
</xs:annotation>
</xs:element>
For further information, refer to the HighlightChangesWidget class documentation.
- Author:
- APGAR Consulting
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetHighlightColorForAssociation(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the color used to highlight the field in association.abstract StringgetHighlightColorForCreation(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the color used to highlight the field during creation.abstract StringgetHighlightColorForUpdate(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the color used to highlight the field during update.abstract com.onwbp.adaptation.AdaptationHomegetParentHome(com.orchestranetworks.service.Session session, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the dataspace of the field the widget is declared on.abstract booleanisHighlightColorEBXDefaultColor(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Specifies if the default EBX color is used to highlight fields.com.orchestranetworks.ui.form.widget.UIWidgetnewInstance(com.orchestranetworks.ui.form.widget.WidgetFactoryContext widgetFactoryContext) Creates an instance of theHighlightChangesWidgetwidget.voidsetCustomWidgetClass(String customWidgetClass) Sets the customWidgetClass, which specifies the second widget used.voidsetCustomWidgetModuleName(String customWidgetModuleName) Sets the customWidgetModuleName, which is the module name from which the custom widget class is loaded.voidsetCustomWidgetParams(String customWidgetParams) Sets the customWidgetParams, which will be used to draw the widget in case ofisCustomWidget= true.voidsetFieldOnChangeJSMethod(String fieldOnChangeJSMethod) Sets the name of the JavaScript Method called on field change.voidsetFkInAssociation(String fkInAssociation) Sets the fkInAssociation field which detects changes in an association when the PK of the associated records is not a FK to the main record.voidsetIsCustomWidget(String isCustomWidget) Sets the isCustomWidget, which specifies that a second widget is used.voidsetIsLinkToRecord(String isLinkToRecord) Sets the isLinkToRecord field which specifies that a "Link to record" widget is drawn.voidsetIsMaster(String isMaster) Sets the master flag used to compare between the parent and child dataspace to perform the highlighting accordingly.voidsetIsReadOnly(String isReadOnly) Sets the widget to be read-only.voidsetIsReadOnlyOnCondition(String isReadOnlyOnCondition) Sets the widget to be read-only if a condition is verified.voidsetLinkToRecordBranch(String linkToRecordBranch) Sets the linkToRecordBranch field which is the target dataspace of the record to be linked through the widget.voidsetLinkToRecordContainer(String linkToRecordContainer) Sets the linkToRecordContainer field which is the target dataset of the record to be linked through the widget.voidsetLinkToRecordKeyFieldPath(String linkToRecordKeyFieldPath) Sets the linkToRecordKeyFieldPath field which is a field of the target record to be linked through the widget based on this field's value.voidsetLinkToRecordTablePath(String linkToRecordTablePath) Sets the linkToRecordTablePath field which is the target table path of the record to be linked through the widget.voidsetReadOnlyCondition(String readOnlyCondition) Sets the condition for setting the widget to be read-only.voidsetReadOnlyfieldToCheck(String readOnlyfieldToCheck) Sets the field to be checked, if it meets theisReadOnlyOnCondition, the widget will be read-only.voidsetup(com.orchestranetworks.ui.form.widget.WidgetFactorySetupContext setupContext) abstract booleanshouldDrawDefaultWidget(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Specifies if the default widget is drawn or not.
-
Constructor Details
-
HighlightChangesWidgetFactory
public HighlightChangesWidgetFactory()
-
-
Method Details
-
newInstance
public com.orchestranetworks.ui.form.widget.UIWidget newInstance(com.orchestranetworks.ui.form.widget.WidgetFactoryContext widgetFactoryContext) Creates an instance of theHighlightChangesWidgetwidget.- Specified by:
newInstancein interfacecom.orchestranetworks.ui.form.widget.UIWidgetFactory<com.orchestranetworks.ui.form.widget.UIWidget>
-
setup
public void setup(com.orchestranetworks.ui.form.widget.WidgetFactorySetupContext setupContext) - Specified by:
setupin interfacecom.orchestranetworks.ui.form.widget.UIWidgetFactory<com.orchestranetworks.ui.form.widget.UIWidget>
-
shouldDrawDefaultWidget
public abstract boolean shouldDrawDefaultWidget(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Specifies if the default widget is drawn or not.- Parameters:
widgetWriter- WidgetWriterwidgetDisplayContext- WidgetDisplayContext- Returns:
- true if the default widget is drawn
-
isHighlightColorEBXDefaultColor
public abstract boolean isHighlightColorEBXDefaultColor(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Specifies if the default EBX color is used to highlight fields.- Parameters:
widgetWriter- WidgetWriterwidgetDisplayContext- WidgetDisplayContext- Returns:
- true if default EBX color is used to highlight
-
getHighlightColorForCreation
public abstract String getHighlightColorForCreation(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the color used to highlight the field during creation.- Parameters:
widgetWriter- WidgetWriterwidgetDisplayContext- WidgetDisplayContext- Returns:
- color code for highlight in creation as a String
-
getHighlightColorForUpdate
public abstract String getHighlightColorForUpdate(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the color used to highlight the field during update.- Parameters:
widgetWriter- WidgetWriterwidgetDisplayContext- WidgetDisplayContext- Returns:
- color code for highlight in case of update as a String
-
getHighlightColorForAssociation
public abstract String getHighlightColorForAssociation(com.orchestranetworks.ui.form.widget.WidgetWriter widgetWriter, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the color used to highlight the field in association.- Parameters:
widgetWriter- WidgetWriterwidgetDisplayContext- WidgetDisplayContext- Returns:
- color code for highlight in case of association as a String
-
getParentHome
public abstract com.onwbp.adaptation.AdaptationHome getParentHome(com.orchestranetworks.service.Session session, com.orchestranetworks.ui.form.widget.WidgetDisplayContext widgetDisplayContext) Returns the dataspace of the field the widget is declared on.- Parameters:
session- SessionwidgetDisplayContext- WidgetDisplayContext- Returns:
- dataspace where widget is declared
-
setIsMaster
Sets the master flag used to compare between the parent and child dataspace to perform the highlighting accordingly.- Parameters:
isMaster- String with Boolean value ("true/false", "t/f", "yes/no", "y/n", "on/off")
-
setFkInAssociation
Sets the fkInAssociation field which detects changes in an association when the PK of the associated records is not a FK to the main record.- Parameters:
fkInAssociation- String with Boolean value ("true/false", "t/f", "yes/no", "y/n", "on/off")
-
setIsReadOnly
Sets the widget to be read-only.- Parameters:
isReadOnly- String with Boolean value ("true/false", "t/f", "yes/no", "y/n", "on/off")
-
setIsReadOnlyOnCondition
Sets the widget to be read-only if a condition is verified.- Parameters:
isReadOnlyOnCondition- String with Boolean value ("true/false", "t/f", "yes/no", "y/n", "on/off")
-
setReadOnlyfieldToCheck
Sets the field to be checked, if it meets theisReadOnlyOnCondition, the widget will be read-only.- Parameters:
readOnlyfieldToCheck- Path of field to check
-
setReadOnlyCondition
Sets the condition for setting the widget to be read-only.- Parameters:
readOnlyCondition- String value which thereadOnlyfieldToCheckvalue will be compared to.
-
setIsCustomWidget
Sets the isCustomWidget, which specifies that a second widget is used.- Parameters:
isCustomWidget- String with Boolean value ("true/false", "t/f", "yes/no", "y/n", "on/off")
-
setCustomWidgetClass
Sets the customWidgetClass, which specifies the second widget used.- Parameters:
customWidgetClass- Class in binary name format
-
setCustomWidgetModuleName
Sets the customWidgetModuleName, which is the module name from which the custom widget class is loaded.- Parameters:
customWidgetModuleName- Module Name as String
-
setCustomWidgetParams
Sets the customWidgetParams, which will be used to draw the widget in case ofisCustomWidget= true.- Parameters:
customWidgetParams- Parameters as JSON String.
-
setIsLinkToRecord
Sets the isLinkToRecord field which specifies that a "Link to record" widget is drawn.- Parameters:
isLinkToRecord- String with Boolean value ("true/false", "t/f", "yes/no", "y/n", "on/off")
-
setLinkToRecordBranch
Sets the linkToRecordBranch field which is the target dataspace of the record to be linked through the widget.- Parameters:
linkToRecordBranch- Record Branch name as a String
-
setLinkToRecordContainer
Sets the linkToRecordContainer field which is the target dataset of the record to be linked through the widget.- Parameters:
linkToRecordContainer- Record Container name as a String
-
setLinkToRecordTablePath
Sets the linkToRecordTablePath field which is the target table path of the record to be linked through the widget.- Parameters:
linkToRecordTablePath- Record Table path as a String
-
setLinkToRecordKeyFieldPath
Sets the linkToRecordKeyFieldPath field which is a field of the target record to be linked through the widget based on this field's value.- Parameters:
linkToRecordKeyFieldPath- Record Key field path as a String
-
setFieldOnChangeJSMethod
Sets the name of the JavaScript Method called on field change.- Parameters:
fieldOnChangeJSMethod- String name of the JavaScript Method for field change
-