| java.lang.Object com.sourcetap.sfa.ui.UIDropDown
All known Subclasses: com.sourcetap.sfa.ui.UIDealStageDropDown, com.sourcetap.sfa.ui.UIHistoryDropDown, com.sourcetap.sfa.address.StateDropDown, com.sourcetap.sfa.ui.UIAccountTypeDropDown, com.sourcetap.sfa.ui.UIFieldUserDropDown, com.sourcetap.sfa.ui.UIIssueSystemDropDown, com.sourcetap.sfa.opportunity.OpportunityContactAvailableSelect, com.sourcetap.sfa.lead.LeadQueueUserAvailableSelect, com.sourcetap.sfa.lead.UserLeadQueueDropDown, com.sourcetap.sfa.ui.UIAttributeDropDown, com.sourcetap.sfa.ui.UIIssueProcedureDropDown, com.sourcetap.sfa.ui.UIContactDropDown, com.sourcetap.sfa.ui.UIUserDropDown, com.sourcetap.sfa.activity.ActivityContactAvailableSelect,
UIDropDown | public class UIDropDown (Code) | | This class is used by the UI builder to display a drop down list on the screen.
author: Steve Fowler author: John Nutting |
Method Summary | |
public static String[] | decodeValue(String attribEntityValueDef, String attribEntityDisplayDef, String currentAttributeName, Object valueObject) Converts a generic value into a data value/display value pair for a < SELECT >
author: John Nutting Parameters: attribEntityValueDef - Defines how to decode the data value from a generic value Parameters: attribEntityDisplayDef - Defines how to decode the display value from a generic value Parameters: currentAttributeName - Name of the attribute on which the < SELECT > is being used (this is used to decode the #currentField tag in the decode definition) Parameters: genericValueObject - Generic value or vector of generic values from which the values can be decoded. | public static String[][] | decodeValueArray(String attribEntityValueDef, String attribEntityDisplayDef, String currentAttributeName, List genericValueVectorList) Converts a vector of generic values into a vector of data value/display value
pairs for a < SELECT >
author: John Nutting Parameters: attribEntityValueDef - Defines how to decode the data value from a generic value Parameters: attribEntityDisplayDef - Defines how to decode the display value from a generic value Parameters: currentAttributeName - Name of the attribute on which the < SELECT > is being used (this is used to decode the #currentField tag in the decode definition) Parameters: genericValueVectorList - List of vectors of generic values from which the values can be decoded. | public String | displayFieldHtml(UIDisplayObject uiDisplayObject, boolean protect, String htmlName, String fieldValue, Vector entityDetailsVector, UIFieldInfo fieldInfo, String action, int tabIndex, UserInfo userInfo, GenericDelegator delegator) Produces an HTML string to display the drop down on a web page being built by the UIWebScreenSection class.
If the screen is being displayed in read-only mode, this method looks up the specified name value using the
current value as the primary key, and displays the looked up name instead of a drop down.
author: John Nutting Parameters: uiDisplayObject - Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder Parameters: protect - Defines wether to show the current field in protected (read-only)_ mode Parameters: htmlName - The name to be used for the current field in the HTML Parameters: fieldValue - Value stored or to be stored in the data base Parameters: entityDetailsVector - Vector of generic values containing the values to be displayed on the screen for all fields Parameters: fieldInfo - Reference to field info object containing attributes of the current field Parameters: action - Action string defining the current screen mode. | public List | getDropDownValues(GenericDelegator delegator, UIDisplayObject uiDisplayObject, ArrayList orderDef, Vector entityDetailsVector, UIFieldInfo fieldInfo, UserInfo userInfo) Return a list of values for a drop down using a UI Display Object defined in the data base.
This method should be overridden in a custom class for custom drop down population. | public List | getDropDownValuesDynamic(GenericDelegator delegator, Map filterValues, UserInfo userInfo) Return a list of values based on filter criteria. | public GenericValue | getReadOnlyValue(String fieldValue, String attributeName, UIDisplayObject uiDisplayObject, Vector entityDetailsVector, GenericDelegator delegator) Looks up the read-only value for the field to be shown on the screen instead
of a drop down select because the mode is read-only.
author: John Nutting Parameters: fieldValue - Value stored or to be stored in the data base. | public static String | getSelectHtml(String htmlName, int tabIndex, String attribSize, String attribDisabled, String attribClass, String attribEmptyFirst, String attribEventHandling, String[][] selectPairArray, String selectedValue, boolean showMultiple) Produces an HTML string to display the drop down on a web page.
This method does not need a reference to the delegator since it does not connect to the data base.
The values are passed in the genericValueVectorList parameter. | public static String | getSelectHtmlReadOnly(String fieldValue, String htmlName, String attributeName, UIDisplayObject uiDisplayObject, String[] selectPair, String anchorHref, String anchorTarget, GenericDelegator delegator) Produces an HTML string to display the drop down on a web page in read-only mode. | public String[] | getValuePair(String fieldValue, GenericDelegator delegator, UIDisplayObject uiDisplayObject, Vector entityDetailsVector, UIFieldInfo fieldInfo, UserInfo userInfo, GenericValue linkGenericValue) Return a data value/display value pair to be passed to the getSelectHtmlReadOnly
method. | public String[][] | getValuePairArray(GenericDelegator delegator, UIDisplayObject uiDisplayObject, ArrayList orderDef, Vector entityDetailsVector, UIFieldInfo fieldInfo, UserInfo userInfo) Return an array of data value/display value pairs to be passed to the getDisplayHtml
method. |
UIDropDown | public UIDropDown()(Code) | | Constructor
|
decodeValue | public static String[] decodeValue(String attribEntityValueDef, String attribEntityDisplayDef, String currentAttributeName, Object valueObject)(Code) | | Converts a generic value into a data value/display value pair for a < SELECT >
author: John Nutting Parameters: attribEntityValueDef - Defines how to decode the data value from a generic value Parameters: attribEntityDisplayDef - Defines how to decode the display value from a generic value Parameters: currentAttributeName - Name of the attribute on which the < SELECT > is being used (this is used to decode the #currentField tag in the decode definition) Parameters: genericValueObject - Generic value or vector of generic values from which the values can be decoded. Note: This must be or contain the generic value of the linked entity listed in the drop down. Array of value/display pairs |
decodeValueArray | public static String[][] decodeValueArray(String attribEntityValueDef, String attribEntityDisplayDef, String currentAttributeName, List genericValueVectorList)(Code) | | Converts a vector of generic values into a vector of data value/display value
pairs for a < SELECT >
author: John Nutting Parameters: attribEntityValueDef - Defines how to decode the data value from a generic value Parameters: attribEntityDisplayDef - Defines how to decode the display value from a generic value Parameters: currentAttributeName - Name of the attribute on which the < SELECT > is being used (this is used to decode the #currentField tag in the decode definition) Parameters: genericValueVectorList - List of vectors of generic values from which the values can be decoded. Note: This must contain instances of the generic value of the linked entity listed in the drop down. Array of value/display pairs |
displayFieldHtml | public String displayFieldHtml(UIDisplayObject uiDisplayObject, boolean protect, String htmlName, String fieldValue, Vector entityDetailsVector, UIFieldInfo fieldInfo, String action, int tabIndex, UserInfo userInfo, GenericDelegator delegator)(Code) | | Produces an HTML string to display the drop down on a web page being built by the UIWebScreenSection class.
If the screen is being displayed in read-only mode, this method looks up the specified name value using the
current value as the primary key, and displays the looked up name instead of a drop down.
author: John Nutting Parameters: uiDisplayObject - Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder Parameters: protect - Defines wether to show the current field in protected (read-only)_ mode Parameters: htmlName - The name to be used for the current field in the HTML Parameters: fieldValue - Value stored or to be stored in the data base Parameters: entityDetailsVector - Vector of generic values containing the values to be displayed on the screen for all fields Parameters: fieldInfo - Reference to field info object containing attributes of the current field Parameters: action - Action string defining the current screen mode. See UIScreenSection for possible values. Parameters: tabIndex - Tab index (tab order) of the current field on the HTML form Parameters: userInfo - Reference to user info object containing information about the currently logged-in user Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base String containing the HTML text that will draw the current field on the web page See Also: com.sourcetap.sfa.ui.UIWebScreenSection |
getDropDownValues | public List getDropDownValues(GenericDelegator delegator, UIDisplayObject uiDisplayObject, ArrayList orderDef, Vector entityDetailsVector, UIFieldInfo fieldInfo, UserInfo userInfo)(Code) | | Return a list of values for a drop down using a UI Display Object defined in the data base.
This method should be overridden in a custom class for custom drop down population. Note: This
method is only used when the screen is first drawn. If the drop down list is updated dynamically, the
getDropDownValuesDynamic method is used.
See Also: UIDropDown.getDropDownValuesDynamic(GenericDelegator,Map,UserInfo) author: Steve Fowler author: John Nutting Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base Parameters: uiDisplayObject - Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder Parameters: orderDef - List of fields defining the sort order of the drop down values Parameters: entityDetailsVector - Vector of generic values containing the values to be displayed on the screen for all fields Parameters: fieldInfo - Reference to field info object containing attributes of the current field Parameters: userInfo - Reference to user info object containing information about the currently logged-in user List of generic values to be displayed in the drop down. This will be null if an error occurs. |
getDropDownValuesDynamic | public List getDropDownValuesDynamic(GenericDelegator delegator, Map filterValues, UserInfo userInfo)(Code) | | Return a list of values based on filter criteria. This is used by the dynamic filtered drop downs
which are modified via DHTML. This method must be overridden in a desdendent class.
Note: This method
is only used when the drop down is updated dynamically.
When the screen is first displayed, the getDropDownValues method is used.
See Also: UIDropDown.getDropDownValues(GenericDelegator,UIDisplayObject,ArrayList,Vector,UIFieldInfo,UserInfo) author: Steve Fowler author: John Nutting Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base Parameters: filterValues - Map containing field/value pairs to be used for filtering the drop down list Parameters: userInfo - Reference to user info object containing information about the currently logged-in user List of generic values to be displayed in the drop down. This will be null if an error occurs. |
getReadOnlyValue | public GenericValue getReadOnlyValue(String fieldValue, String attributeName, UIDisplayObject uiDisplayObject, Vector entityDetailsVector, GenericDelegator delegator)(Code) | | Looks up the read-only value for the field to be shown on the screen instead
of a drop down select because the mode is read-only.
author: John Nutting Parameters: fieldValue - Value stored or to be stored in the data base. Used as the primary key to look up the value to be displayed. Parameters: attributeName - Name of the attribute being displayed Parameters: uiDisplayObject - Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder Parameters: entityDetailsVector - Vector that holds one or more generic values from which the display value can be decoded Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base Array containing the data value and display value. |
getSelectHtml | public static String getSelectHtml(String htmlName, int tabIndex, String attribSize, String attribDisabled, String attribClass, String attribEmptyFirst, String attribEventHandling, String[][] selectPairArray, String selectedValue, boolean showMultiple)(Code) | | Produces an HTML string to display the drop down on a web page.
This method does not need a reference to the delegator since it does not connect to the data base.
The values are passed in the genericValueVectorList parameter. This method also does not need
a reference to a UIDisplayObject or a UIFieldInfo, so it can be used separately from the UI Builder
if required.
author: John Nutting Parameters: htmlName - The name to be used for the current field in the HTML Parameters: tabIndex - Tab index (tab order) of the current field on the HTML form Parameters: attribSize - String for the HTML SIZE attribute to be inserted into the < SELECT > Parameters: attribDisabled - String for the HTML SIZE attribute to be inserted into the < SELECT > Parameters: attribClass - String for the HTML CLASS attribute to be inserted into the < SELECT > Parameters: attribEmptyFirst - String defining whether to include a blank option at the top of the select list Parameters: attribEventHandling - String to be embedded in the < SELECT > for event handling. Example: 'onChange="window.open(...)";' Parameters: selectPairArray - Array containing pairs of values. selectPair[0][0] contains the data value for the first row, and selectPair[0][1] contains the display value for the first row. Parameters: selectedValue - Value stored or to be stored in the data base. Detemines which item in the list will be selected initially. Parameters: showMultiple - Indicates whether to show the list as a list box and allow multiple items to be selected (true), or as a regular drop down list (false) String containing the HTML text that will draw the < SELECT > on the web page |
getSelectHtmlReadOnly | public static String getSelectHtmlReadOnly(String fieldValue, String htmlName, String attributeName, UIDisplayObject uiDisplayObject, String[] selectPair, String anchorHref, String anchorTarget, GenericDelegator delegator)(Code) | | Produces an HTML string to display the drop down on a web page in read-only mode. The name is probably
a misnomer since the drop list is not actually produced. Instead the display value for the selected item is displayed.
This avoids retrieving the list from the data base when the user won't be allowed to select from it anyway.
author: John Nutting Parameters: fieldValue - Value stored or to be stored in the data base. Used as the primary key to look up the value to be displayed. Parameters: htmlName - The name to be used for the current field in the HTML Parameters: attributeName - Name of the attribute being displayed Parameters: uiDisplayObject - Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder Parameters: selectPair - Array containing a pair of values. selectPair[0] contains the data selectPair[1] contains the display value. Parameters: anchorHref - String to be inserted as the HREF clause of an < A > tag Parameters: anchorTarget - String to be inserted as the TARGET clause of an < A > tag Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base String containing the HTML text that will draw the < SELECT > on the web page |
getValuePair | public String[] getValuePair(String fieldValue, GenericDelegator delegator, UIDisplayObject uiDisplayObject, Vector entityDetailsVector, UIFieldInfo fieldInfo, UserInfo userInfo, GenericValue linkGenericValue)(Code) | | Return a data value/display value pair to be passed to the getSelectHtmlReadOnly
method. In this root version of this method, the generic value returned by
the getReadOnlyValue method is simlply converted to an array using the decodeValue
method. However, this method may be overridden in the descendent if special processing
is needed, as may be the case when two different types of entities are to be combined
into the same drop list.
See Also: UIDropDown.getReadOnlyValue(String,String,UIDisplayObject,Vector,GenericDelegator) See Also: UIDropDown.decodeValue(String,String,String,Object) See Also: UIDropDown.getSelectHtmlReadOnly(String,String,String,UIDisplayObject,String[],GenericDelegator) author: John Nutting Parameters: fieldValue - Value of field being displayed Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base Parameters: uiDisplayObject - Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder Parameters: entityDetailsVector - Vector of generic values containing the values to be displayed on the screen for all fields Parameters: fieldInfo - Reference to field info object containing attributes of the current field Parameters: userInfo - Reference to user info object containing information about the currently logged-in user Parameters: linkGenericValue - Generic value returned to calling method One-dimensional array with 2 elements containing the data value and the display value. |
getValuePairArray | public String[][] getValuePairArray(GenericDelegator delegator, UIDisplayObject uiDisplayObject, ArrayList orderDef, Vector entityDetailsVector, UIFieldInfo fieldInfo, UserInfo userInfo)(Code) | | Return an array of data value/display value pairs to be passed to the getDisplayHtml
method. In this root version of this method, the list of generic values returned by
the getDropDownValues is simlply converted to an array using the decodeValueArray
method. However, this method may be overridden in the descendent if special processing
is needed, as may be the case when two different types of entities are to be combined
into the same drop list.
See Also: UIDropDown.getDropDownValues(GenericDelegator,UIDisplayObject,ArrayList,Vector,UIFieldInfo,UserInfo) See Also: UIDropDown.decodeValueArray(String,String,String,List) author: John Nutting Parameters: delegator - Reference to the OFBIZ delegator being used to connect to the data base Parameters: uiDisplayObject - Reference to a display object defined in the data base and attached to the field to be displayed by the UI builder Parameters: orderDef - List of fields defining the sort order of the drop down values Parameters: entityDetailsVector - Vector of generic values containing the values to be displayed on the screen for all fields Parameters: fieldInfo - Reference to field info object containing attributes of the current field Parameters: userInfo - Reference to user info object containing information about the currently logged-in user List of generic values to be displayed in the drop down. This will be null if an error occurs. |
|
|