New generation of Widgets
Classes
Namespaces
- button
- checkbox
- chipsChooser
- commons
- connectable
- input
- login
- sideBySideChooser
- singleSelect
- slider
- suggestInput
- universalFilter
- utils
- validation
Methods
-
staticbcdui.widgetNg.createButton(args)
widgetNg/widgetPackage.js, line 55 -
A BCD-UI button (not HTML native) conforming to the theme. If an optionsModelXPath is given, it will be rendered as a dropDown button.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. captioni18nToken optional disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. hrefurl optional HTML href idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. onClickActionfunction optional Function to execute on click. Behaves like addEventListener, i.e. it expects a reference to a function. "onClickAction: bcdui.core.lifecycle.applyAction" or "onClickAction: function(){ alert("Hello"); }". The context of the function is set to the element this widget it attached to. To provide a context and parameters to the called function use bind: "onClickAction: myFunc.bind( ctx, param1 , param2 )". In case of declarative environments, like HTML5 Custom Element <bcd-buttongNg>, it is a string with executable javascript code "onClickAction= 'bcdui.core.lifecycle.applyAction();'". optionsModelRelativeValueXPathxPath . optional xPath expression relative to 'optionsModelXPath' providing values for options to display, if this is defined, values referenced by optionsModelXPath are treated as captions. Wins over @caption and @ignoreCaption param. optionsModelXPathxPath optional xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] stayPressedboolean optional button stays pressed and is disabled until page reload. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. texti18nToken optional widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createCheckbox(args)
widgetNg/widgetPackage.js, line 25 -
Basic checkbox which implements a 1/0 switch. The label (if used) is placed right to the checkbox.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element onchangefunction optional the HTML onchange event onclickfunction optional the HTML onclick event requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. skinenum checkbox optional Currently supporting checkbox (default) and switch style. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. valuesstring 1|0 optional A pipe separated value of two string which are used for a checked/unchecked state. By default this is 1 and 0. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createChipsChooser(args)
widgetNg/widgetPackage.js, line 385 -
Offers a ChipsChooser where you can select items on a source side and move them to a target side
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description optionsModelXPathmodelXPath xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. allowUnknownTargetValueboolean optional If true, target items are not removed when they are not part of the source's options model. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. bindingSetIdstring optional Name of the binding set which is used for the lookup. bRefsstring optional BindingItem(s) which is(are) used for the lookup. If two are given, it is assumed that first one is caption, second one is code. delaynumber 500 optional Time (in ms) which passes till the lookup is done. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doSortOptionsboolean false optional Can be set to 'true' if the options should be sorted alphabetically. This is disabled per default to avoid CPU wasting. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. filterBRefsstringList optional The space separated list of binding Refs that will be used in filter clause of request document. filterElementstring optional Custom filter element (f:And, f:Or, f:Not, f:Expression) in wrs-filter format, see filter-1.0.0.xsd or a string as required by bcdui.wrs.wrsUtil.parseFilterExpression or the result of it - note that the function allows filling in values without escaping issues if the filter is not fixed. generateItemHtmlfunction optional Function to generate the html for one container item. Gets object with properties: value, caption, position; see implementation documentation to read more about the structure to return by this function. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. labeli18nToken optional If provided, enables widget to render a label element maxRowsnumber 30 optional Limit the result of the SQL lookup. onBeforeChangefunction optional Handler function triggered before change, if false is returned, the change is rejected receives property map: {element = the widget element, dir = one of bcdui.widgetNg.chipsChooser.CHANGE_DIRECTION.*, scope = object with .items to move, which can also be modified (i.e. remove items not eligible to move)} onChangefunction optional Handler function triggered after change onItemMovedfunction optional Handler function triggered after an item was moved. Receives property map: {from = source, to = destination, dir = one of bcdui.widgetNg.connectable.CHANGE_DIRECTION.*} optionsModelRelativeValueXPathxPath optional xPath expression relative to 'optionsModelXPath' providing values preloadboolean false optional Can be set to 'true' if the options (given by bindingSet and bRef) should get loaded completely on startup. singleClickboolean false optional If true, single clicking an item moves it. Default is false. singleSelectboolean false optional Can be set to 'true' if you want to limit the selection to one item only. sortOptionsFunctionfunction optional a compareFunction(a,b) passed to Array.prototype.sort(); with a, b are objects with { caption, value } A function used to sort items in the connectable. The defaulting implementation uses alphabetic sorting on caption. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. targetModelXPathRightwritableModelXPath optional The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. upperTitlestring optional Optional title above upper area upperTitleRightstring optional Optional title above upper right area, when targetModelXPathRight is used. urlurl optional The URL the model is loaded from. This URL can be extended with a compressed request document if a requestDocument parameter is provided. If omitted the WrsServlet is taken. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. wildcardenum startswith optional The wildcards apply to filtering within the drop down list and for server side filters. This option applies only if bound to a f:Expression element and is ignored otherwise. For a f:Filter with @op='like', this controls the prefilling with wildcards ('*') when the value is yet empty and the field gets the focus. Can be 'contains', 'startswith' or 'endswith'. The user can overwrite this by adding/removing wildcards when editing the field. wrsInlineValueDelimstring optional Delimiter used for WRS read and write. Default is a slash. -
staticbcdui.widgetNg.createComment(args)
widgetNg/widgetPackage.js, line 592 -
Offers a simple container with comment functionality
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description instancestring A given instance for the current comments. scopestring A given scope for the current comments. addBRefsstring optional Space separated list of additional bRefs you want to load. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. captionstring optional A caption string which appears in the top add row. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. filterBRefsstringList optional The space separated list of binding Refs that will be used in filter clause of request document. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. labeli18nToken optional If provided, enables widget to render a label element onBeforeSavefunction optional Function which is called before each save operation. Parameter holds current wrs dataprovider. Function needs to return true to save or false for skipping save process and resetting data. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createConnectable(args)
widgetNg/widgetPackage.js, line 432 -
Offers a simple container with multi select, drag'n drop functionalities
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description scopestring Defines the scope of the box. Source. allowUnknownTargetValueboolean optional If true, target items are not removed when they are not part of the source's options model. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. classNamestring optional Optional additional classname which is added to the container. dblClickboolean true optional If true, double clicking an item moves it. Default is true. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doSortOptionsboolean false optional Can be set to 'true' if the options should be sorted using the 'sortOptionsFunction' function. This is disabled per default to avoid CPU wasting. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. generateItemHelperHtmlfunction optional Function to generate the html for helper container item which appears when you drag items. Basically the function for jQuery's sortable helper function. By default the first 5 items are listed. generateItemHtmlfunction optional Function to generate the html for one container item. Gets object with properties: value, caption, position; see implementation documentation to read more about the structure to return by this function. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isDoubleClickTargetboolean optional If true (and box is target) then double click moves items from source to this target, otherwise first found target. Default is false. onBeforeChangefunction optional Handler function triggered before change of this box only, if false is returned, the change is rejected receives property map: {element = the widget element, dir = one of bcdui.widgetNg.connectable.CHANGE_DIRECTION.*, scope = object with .items to move, which can also be modified (i.e. remove items not eligible to move)} onChangefunction optional Handler function triggered after change. It's triggered on source AND destination of the change (e.g. source/target, target/source and target/target) onItemMovedfunction optional Handler function triggered after an item was moved. Receives property map: {from = source, to = destination, dir = one of bcdui.widgetNg.connectable.CHANGE_DIRECTION.*} onSelectedfunction optional Handler function triggered when at least of the connectable items changed its status from selected to unselected (or moved a selected). This may fire multiple times. optionsModelRelativeFilterPredicatexPath optional xPath expression relative to 'optionsModelXPath' which can be used to filter options model items optionsModelRelativeValueXPathxPath optional xPath expression relative to 'optionsModelXPath' providing values optionsModelXPathwritableModelXPath optional xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue]. If you specify an optionsmodelxpath, the box automatically acts as source. showLassoboolean true optional If true, you get a selection lasso. Default is true. singleClickboolean false optional If true, single clicking an item moves it. Default is false. singleSelectboolean false optional Can be set to 'true' if you want to limit the selection to one item only. sortOptionsFunctionfunction optional a compareFunction(a,b) passed to Array.prototype.sort(); with a, b are objects with { caption, value } A function used to sort items in the connectable. The defaulting implementation uses alphabetic sorting on caption. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. targetModelXPathwritableModelXPath optional The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. If you specify a targetmodelxpath, the box automatically acts as target unselectAfterMoveboolean optional If true, the items get unselected after being moved. Default is false. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. wildcardenum startswith optional The wildcards apply to filtering within the drop down list and for server side filters. This option applies only if bound to a f:Expression element and is ignored otherwise. For a f:Filter with @op='like', this controls the prefilling with wildcards ('*') when the value is yet empty and the field gets the focus. Can be 'contains', 'startswith' or 'endswith'. The user can overwrite this by adding/removing wildcards when editing the field. writeCaptionsboolean optional If true, target items also get a bcdCaption attribute holding the caption of the value. If used, you should add it to source and target connectables. wrsInlineValueDelimstring optional Delimiter used for WRS read and write. Default is a slash. -
staticbcdui.widgetNg.createDateInput(args)
widgetNg/widgetPackage.js, line 129 -
Date picker for temporal types supports native html5 widget and fallsback to custom implementation in case browser does not support it.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. typeenum date optional Select a calendar year and a month or a date. Uses HTML5 native if available. For other cases two or three single selects next to each other. Writes XML format 2013-12[-01]. (gYearMonth or date) widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createInput(args)
widgetNg/widgetPackage.js, line 100 -
A simple text field input allowing user to enter arbitrary text. Specific input type can be preset via 'type' attribute. The input can be generally validated using 'pattern' paramter (html5 compliant) containing the JS regular expression, in such a case a built-in validation for WRS binding is overridden by provided validator and effectively disabled.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. asyncValidationFunctionfunction optional Like 'validationFunction' but this one must return a Promise resolving with validation result. While validating, the widget sets 'bcdValidationPending' CSS class on the owning html element. The value is written to the model after a positive validation result. If a Promise is rejected for any reason, the widget switches to invalid state. autocompletestring off optional HTML autocomplete attribute. Can be on or off. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doTrimInputboolean false optional If enabled, the input is trimms leading/trailing spaces before writing to data model enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isSyncboolean false optional Uses synchronously validation when set to true. This also disables the use of asyncValidationFunction. Only necessary for setups where you can't handle waiting for the async write of data (e.g. grid widgets) isTextSelectedOnFocusboolean false optional if set, the text will be selected once the field gets a focus, so that further user input will replace the content. In case 'setCursorPositionAtEnd' is also set to true - this option has precedence. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element maxnumber optional Sets the maximum value for an integer or numeric type input field (HTML5 only). maxlengthinteger optional if defined, limits the input to the given length. minnumber optional Sets the minimum value for an integer or numeric type input field (HTML5 only). onchangefunction optional the HTML onchange event onclickfunction optional the HTML onclick event oninputfunction optional The HTML oninput event. patternstring optional regular expression pattern to validate the input placeholderi18nToken optional A default text displayed if no content was entered, this is i18n key or true for default. May be empty to display nothing. requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. setCursorPositionAtEndboolean false optional if set the cursor position will always be at the end of the input once the input field gets a focus stepnumber optional Sets the step value (HTML5 only). tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. typeenum text optional a type of this input field. Following types are supported for validation: text: a simple text input email: a simple text input with email validation, uses email input where available password: a password input time: hh:mm input, use step 1 to show seconds, too int: an integer value (uses to html5 type=number with step=1 where available) numeric: a decimal value (corresponds to html5 type=number with step=any and uses where available) color: a html5 color picker validationFunctionstring optional Name of a widget validator function which will be attached additionally to implicit validators. the API of given function is: validatorFunction(htmlElementId) : returns either NULL or object containing validationMessage (String or array of Strings) property, i.e. { validationMessage : String } or { validationMessage[] : String[] }, the validationMessage carries the message to be displayed to the user. The String may start with bcdui.i18n.TAG character to classify an i18n-key of the message, rather than a message itself. the args parameter is the htmlElementId of the widget to validate. Please use: bcdui.widgetNg.validation.validators.widget.getValue(htmlElementId) to properly retrieve widgets value. There is only one validator function allowed. In order to use or re-use or combine existing validations please do so in your validationFunction (that is delegate to other validators) and simply aggregate validation results into array of validationMessage[] This validator MUST ignore NULL or empty value. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createInputLookup(args)
widgetNg/widgetPackage.js, line 671 -
An easy to use suggestInput widget with server sided filling of a data given by binding and bindingItem.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description bindingSetIdstring Name of the binding set which is used for the lookup. bRefstring BindingItem which is used for the lookup. optionsModelXPathmodelXPath xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. applyListItemSelectionFunctionfunction optional this function is called when applying value from a dropdown selection (custom rendering mode only), it gets following parameters: (instance, htmlElementId, bcdCaption, bcdId) the bcdCaption is the string provided by options model and the bcdId is the value, in case provided by options model, too. The default implementation is executing { instance._syncWrite(htmlElementId, bcdCaption); } asyncValidationFunctionfunction optional Like 'validationFunction' but this one must return a Promise resolving with validation result. While validating, the widget sets 'bcdValidationPending' CSS class on the owning html element. The value is written to the model after a positive validation result. If a Promise is rejected for any reason, the widget switches to invalid state. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. clearOptionboolean | i18nToken false optional if enabled, there will be an option to clear the selection. This attribute may be true|false or a string, in latter case the option is considered enabled and a string follows the i18nToken type definition. delaynumber 500 optional Time (in ms) which passes till the lookup is done. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableNativeSupportboolean false optional This parameter disables native HTML5 support for this widget. Please read more on side-effects in widget documentation. disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doRetainInputSchemaboolean false optional This option is 'false' per default, what means that the internal options model generates following schema: /Values/Value[@caption]+ per matched item. The Value element itself holds the ID with optional @caption attribute holding either ID or mapped caption in case optionsModelRelativeValueXPath is provided. In some cases you might want to work with internal options model and elements of the input document. Then you can enable this flag, which effictively disables any semantics, such as 'caption' or 'id' - as the internal options document will contain only matched elements from the input document, pay attention if you select an attribute in your xpath. doSortOptionsboolean false optional Can be set to 'true' if the options should be sorted alphabetically. This is disabled per default to avoid CPU wasting. doTrimInputboolean false optional If enabled, the input is trimms leading/trailing spaces before writing to data model enableNavPathboolean false optional Set to true if widget should be added to navpath handling. filterElementstring optional Custom filter element (f:And, f:Or, f:Not, f:Expression) in wrs-filter format, see filter-1.0.0.xsd or a string as required by bcdui.wrs.wrsUtil.parseFilterExpression or the result of it - note that the function allows filling in values without escaping issues if the filter is not fixed. filterFunctionstring optional function name of filtering function receiving keystrokes; it gets { value, onComplete } and must call onComplete() callback once its done hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isSyncboolean false optional Uses synchronously validation when set to true. This also disables the use of asyncValidationFunction. Only necessary for setups where you can't handle waiting for the async write of data (e.g. grid widgets) isTextSelectedOnFocusboolean false optional if set, the text will be selected once the field gets a focus, so that further user input will replace the content. In case 'setCursorPositionAtEnd' is also set to true - this option has precedence. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element maxlengthinteger optional if defined, limits the input to the given length. optionsModelRelativeValueXPathxPath . optional xPath expression relative to 'optionsModelXPath' providing values optionsRendererIdstring optional * only applies to non-native implementation of this widget - to use this option you have to flag disableNativeSupport * The renderer provided here *must* exist prior binding to widget, that is it has to be known to ObjectRegistry at this time. At is recommended to construct your renderer with suppressInitialRendering=true, so that it does not run at the construction time and also provide targetHTMLElementId pointing to invisible container, since the renderer would reset containers CSS class having visual effects at construction time. Default options rendering stylesheet is located at /bcdui/widgetNg/suggestInput/optionsRenderer.xslt but you can provide your own here; the transformation has to output HTML with root element DIV containing block elements each representing an inidivual value. The children elements provides the value via bcdValue attribute. The rendered list is displayed in a dialog so user can pick-up an item. After that, the value is written to model which is found at bcdValue attribute. This way you can render complex HTML content. Recommended format is: div[div[@bcdValue]*] You can also respect current widget value i.e. to implement prefiltering, the values are provided as parameters to the stylesheet. Please refer to original stylesheet documentation for more information and parameters which are provided during transformation. the targetHTMLElementId of the renderer is automatically bound to internal options list box, the input document to this renderer is the options-model of the widget. patternstring optional regular expression pattern to validate the input placeholderi18nToken optional A default text displayed if no content was entered, this is i18n key or true for default. May be empty to display nothing. requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. rowEndnumber 30 optional Limit the result of the SQL lookup. setCursorPositionAtEndboolean false optional if set the cursor position will always be at the end of the input once the input field gets a focus suggestItemCountinteger 10 optional Number of items to suggest during typing, this applies to non-native implementation only. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. validationFunctionstring optional Name of a widget validator function which will be attached additionally to implicit validators. the API of given function is: validatorFunction(htmlElementId) : returns either NULL or object containing validationMessage (String or array of Strings) property, i.e. { validationMessage : String } or { validationMessage[] : String[] }, the validationMessage carries the message to be displayed to the user. The String may start with bcdui.i18n.TAG character to classify an i18n-key of the message, rather than a message itself. the args parameter is the htmlElementId of the widget to validate. Please use: bcdui.widgetNg.validation.validators.widget.getValue(htmlElementId) to properly retrieve widgets value. There is only one validator function allowed. In order to use or re-use or combine existing validations please do so in your validationFunction (that is delegate to other validators) and simply aggregate validation results into array of validationMessage[] This validator MUST ignore NULL or empty value. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. wildcardenum startswith optional The wildcards apply to filtering within the drop down list and for server side filters. This option applies only if bound to a f:Expression element and is ignored otherwise. For a f:Filter with @op='like', this controls the prefilling with wildcards ('*') when the value is yet empty and the field gets the focus. Can be 'contains', 'startswith' or 'endswith'. The user can overwrite this by adding/removing wildcards when editing the field. -
staticbcdui.widgetNg.createLabel(args)
widgetNg/widgetPackage.js, line 618 -
A BCD-UI label. If an optionsModelXPath is given, it will be rendered as an unordered list.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. captioni18nToken optional disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. optionsModelXPathxPath optional xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. texti18nToken optional widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createLogin(args)
widgetNg/widgetPackage.js, line 756 -
a login-widget, can be used as custom element, if contents are provided they are not replaced and the widget operates on given child model
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createMultiCheck(args)
widgetNg/widgetPackage.js, line 702 -
Renders a multiCheck widget with checkboxes for selection.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description optionsModelXPathmodelXPath xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doSortOptionsboolean false optional Can be set to 'true' if the options should be sorted using the 'sortOptionsFunction' function. This is disabled per default to avoid CPU wasting. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. labeli18nToken optional If provided, enables widget to render a label element optionsModelRelativeParentXPathxPath optional xPath expression relative to 'optionsModelXPath' providing values for the parent, this should correspond to the same data type as the value of the options model. optionsModelRelativeValueXPathxPath optional xPath expression relative to 'optionsModelXPath' providing values singleSelectboolean false optional Can be set to 'true' if you want to limit the selection to one item only. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. wildcardenum startswith optional The wildcards apply to filtering within the drop down list and for server side filters. This option applies only if bound to a f:Expression element and is ignored otherwise. For a f:Filter with @op='like', this controls the prefilling with wildcards ('*') when the value is yet empty and the field gets the focus. Can be 'contains', 'startswith' or 'endswith'. The user can overwrite this by adding/removing wildcards when editing the field. -
staticbcdui.widgetNg.createPasteList(args)
widgetNg/widgetPackage.js, line 302 -
Text area to paste list of elements for an in-clause
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description colsinteger 5 HTML Parameter on the textarea to set number of columns targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. asyncValidationFunctionfunction optional Like 'validationFunction' but this one must return a Promise resolving with validation result. While validating, the widget sets 'bcdValidationPending' CSS class on the owning html element. The value is written to the model after a positive validation result. If a Promise is rejected for any reason, the widget switches to invalid state. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. autogrowboolean false optional Set to true if the textarea should auto grow while typing. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doTrimInputboolean false optional If enabled, the input is trimms leading/trailing spaces before writing to data model enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isSyncboolean false optional Uses synchronously validation when set to true. This also disables the use of asyncValidationFunction. Only necessary for setups where you can't handle waiting for the async write of data (e.g. grid widgets) isTextSelectedOnFocusboolean false optional if set, the text will be selected once the field gets a focus, so that further user input will replace the content. In case 'setCursorPositionAtEnd' is also set to true - this option has precedence. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element maxlengthinteger optional if defined, limits the input to the given length. maxValsinteger 1000 optional Only the first maxVals distinct values are used. outSepstring , optional Letter treated as separators in the targetModel and also expected when reading in values from there, defaults to comma. pasteSepsstring ,; \|\t\n optional Letters treated as separators between values when pasting. Defaults: comma, semicolon, space, pipe, tab, newline. patternstring optional regular expression pattern to validate the input placeholderi18nToken optional A default text displayed if no content was entered, this is i18n key or true for default. May be empty to display nothing. requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. rowsinteger optional HTML Parameter on the textarea to set number of rows setCursorPositionAtEndboolean false optional if set the cursor position will always be at the end of the input once the input field gets a focus tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. toUpperboolean false optional If true, all values are translated to uppercase. validationFunctionstring optional Name of a widget validator function which will be attached additionally to implicit validators. the API of given function is: validatorFunction(htmlElementId) : returns either NULL or object containing validationMessage (String or array of Strings) property, i.e. { validationMessage : String } or { validationMessage[] : String[] }, the validationMessage carries the message to be displayed to the user. The String may start with bcdui.i18n.TAG character to classify an i18n-key of the message, rather than a message itself. the args parameter is the htmlElementId of the widget to validate. Please use: bcdui.widgetNg.validation.validators.widget.getValue(htmlElementId) to properly retrieve widgets value. There is only one validator function allowed. In order to use or re-use or combine existing validations please do so in your validationFunction (that is delegate to other validators) and simply aggregate validation results into array of validationMessage[] This validator MUST ignore NULL or empty value. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createRankingChooser(args)
widgetNg/widgetPackage.js, line 733 -
Offers a ranking chooser where you can select dimensions and measures for a ranking operation
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isScorecardboolean false optional Can be set to 'true' if ranking is used for a scorecard. In this case scc: prefix is used. labeli18nToken optional If provided, enables widget to render a label element limitnumber 3 optional Limit the number of possible rankings. optionsModelRelativeValueXPathDimensionsxPath . optional xPath expression relative to 'optionsModelXPath' providing values for options to display, if this is defined, values referenced by optionsModelXPath are treated as captions. Wins over @caption and @ignoreCaption param. optionsModelRelativeValueXPathMeasuresxPath . optional xPath expression relative to 'optionsModelXPath' providing values for options to display, if this is defined, values referenced by optionsModelXPath are treated as captions. Wins over @caption and @ignoreCaption param. optionsModelXPathDimensionsxPath optional xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] optionsModelXPathMeasuresxPath optional xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createSideBySideChooser(args)
widgetNg/widgetPackage.js, line 336 -
Offers a SideBySiderChooser where you can select items on a source side and move them to a target side
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description optionsModelXPathmodelXPath xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. allowUnknownTargetValueboolean optional If true, target items are not removed when they are not part of the source's options model. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doSortOptionsboolean true optional Can be set to 'false' if the options should not be sorted alphabetically. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. onBeforeChangefunction optional Handler function triggered before change, if false is returned, the change is rejected receives property map: {element = the widget element, dir = one of bcdui.widgetNg.sideBySideChooser.CHANGE_DIRECTION.*, scope = object with .items to move, which can also be modified (i.e. remove items not eligible to move)} onChangefunction optional Handler function triggered after change optionsModelRelativeFilterPredicatexPath optional xPath expression relative to 'optionsModelXPath' which can be used to filter options model items optionsModelRelativeValueXPathxPath optional xPath expression relative to 'optionsModelXPath' providing values sourceCaptionstring Source optional Caption(header) for source block items. Can be an i18n key (with leading i18n token). tabindexinteger optional the HTML compliant tabIndex targetCaptionstring Target optional Caption(header) for target block items. Can be an i18n key (with leading i18n token). targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. wrsInlineValueDelimstring optional Delimiter used for WRS read and write. Default is a slash. -
staticbcdui.widgetNg.createSingleSelect(args)
widgetNg/widgetPackage.js, line 170 -
Renders a browser does natively for select or radio.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description optionsModelXPathmodelXPath xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. asyncValidationFunctionfunction optional Like 'validationFunction' but this one must return a Promise resolving with validation result. While validating, the widget sets 'bcdValidationPending' CSS class on the owning html element. The value is written to the model after a positive validation result. If a Promise is rejected for any reason, the widget switches to invalid state. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. clearOptionboolean | i18nToken false optional if enabled, there will be an option to clear the selection. This attribute may be true|false or a string, in latter case the option is considered enabled and a string follows the i18nToken type definition. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doAutoSelectSolelyOptionboolean false optional If enabled, and there is only one option available, the widget will switch to that value. doRetainInputSchemaboolean false optional This option is 'false' per default, what means that the internal options model generates following schema: /Values/Value[@caption]+ per matched item. The Value element itself holds the ID with optional @caption attribute holding either ID or mapped caption in case optionsModelRelativeValueXPath is provided. In some cases you might want to work with internal options model and elements of the input document. Then you can enable this flag, which effictively disables any semantics, such as 'caption' or 'id' - as the internal options document will contain only matched elements from the input document, pay attention if you select an attribute in your xpath. doSortOptionsboolean false optional Can be set to 'true' if the options should be sorted alphabetically. This is disabled per default to avoid CPU wasting. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. ignoreCaptionboolean optional Do not use @caption, use id for caption as well. The caption mode is disabled. isSyncboolean false optional Uses synchronously validation when set to true. This also disables the use of asyncValidationFunction. Only necessary for setups where you can't handle waiting for the async write of data (e.g. grid widgets) keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element optionsModelRelativeValueXPathxPath . optional xPath expression relative to 'optionsModelXPath' providing values for options to display, if this is defined, values referenced by optionsModelXPath are treated as captions. Wins over @caption and @ignoreCaption param. patternstring optional regular expression pattern to validate the input placeholderi18nToken optional A default text displayed if no content was entered, this is i18n key or true for default. May be empty to display nothing. requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. skinenum combo optional Currently supporting combo style only tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. validationFunctionstring optional Name of a widget validator function which will be attached additionally to implicit validators. the API of given function is: validatorFunction(htmlElementId) : returns either NULL or object containing validationMessage (String or array of Strings) property, i.e. { validationMessage : String } or { validationMessage[] : String[] }, the validationMessage carries the message to be displayed to the user. The String may start with bcdui.i18n.TAG character to classify an i18n-key of the message, rather than a message itself. the args parameter is the htmlElementId of the widget to validate. Please use: bcdui.widgetNg.validation.validators.widget.getValue(htmlElementId) to properly retrieve widgets value. There is only one validator function allowed. In order to use or re-use or combine existing validations please do so in your validationFunction (that is delegate to other validators) and simply aggregate validation results into array of validationMessage[] This validator MUST ignore NULL or empty value. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createSlider(args)
widgetNg/widgetPackage.js, line 562 -
A slider widget providing UI with a moving handle to select a value or to select a range. The implementation is based on noUiSlider, so is the API. Please refer to original documentation to explore all options. You can use full options from JS-API, however, they are not available from declarative context. Currently, the range mode is restricted to 2 handles only and you cannot provide start option, since it is read from the model.
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isRangeboolean false optional If enabled, the slider will operate in range-selection mode, providing min/max handles to define a range. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labelRenderingFunctionfunction optional Your custom rendering function to render the label, which gets args with following properties: targetHtml, values[], captions[]; this function is executed on every update to the widget but also while sliding. This option is only effective unless native 'tooltips' option is used. labelRenderingFunctionTargetHtmlstring optional jQuery selector to access element to use as targetHtml for labelRenderingFunction, if you choose to use your custom one. This option is only effective unless native 'tooltips' option is used. maxnumber optional Defines the maximum value, must not be set if optionsModelXpath is provided. minnumber optional Defines the minimum value, must not be set if optionsModelXpath is provided. optionsModelRelativeValueXPathxPath . optional xPath expression relative to 'optionsModelXPath' providing values for options to display, if this is defined, values referenced by optionsModelXPath are treated as captions. optionsModelXPathmodelXPath optional xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue]. If not provided, the widget is not linked to discrete values, in this case the min/max options has to be provided. relativeTargetXPathMaxxPath /max optional When operating in range-mode, this defines the relative xpath to targetModelXPath, to write the 'max' value. This option not defined in non-range mode. relativeTargetXPathMinxPath /min optional When operating in range-mode, this defines the relative xpath to targetModelXPath, to write the 'min' value. This option not defined in non-range mode. requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createSuggestInput(args)
widgetNg/widgetPackage.js, line 218 -
Allowing to either depict certain value from a list or accepting new value not in list. This input type always offers an input prompt which either acts as pre-filter for the list or also allows to enter new items. This widget can handle big number of options at good performance as well as supports complex options layout in non-native mode. Furthermore it provides you with ability to access remote data. [No ID/Caption mapping is available here.]
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description optionsModelXPathmodelXPath xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display; especially this one supports cross references between models, i.e. $options / * / Value[@id = $guiStatus / * / MasterValue] targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. applyListItemSelectionFunctionfunction optional this function is called when applying value from a dropdown selection (custom rendering mode only), it gets following parameters: (instance, htmlElementId, bcdCaption, bcdId) the bcdCaption is the string provided by options model and the bcdId is the value, in case provided by options model, too. The default implementation is executing { instance._syncWrite(htmlElementId, bcdCaption); } asyncValidationFunctionfunction optional Like 'validationFunction' but this one must return a Promise resolving with validation result. While validating, the widget sets 'bcdValidationPending' CSS class on the owning html element. The value is written to the model after a positive validation result. If a Promise is rejected for any reason, the widget switches to invalid state. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. clearOptionboolean | i18nToken false optional if enabled, there will be an option to clear the selection. This attribute may be true|false or a string, in latter case the option is considered enabled and a string follows the i18nToken type definition. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableNativeSupportboolean false optional This parameter disables native HTML5 support for this widget. Please read more on side-effects in widget documentation. disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doRetainInputSchemaboolean false optional This option is 'false' per default, what means that the internal options model generates following schema: /Values/Value[@caption]+ per matched item. The Value element itself holds the ID with optional @caption attribute holding either ID or mapped caption in case optionsModelRelativeValueXPath is provided. In some cases you might want to work with internal options model and elements of the input document. Then you can enable this flag, which effictively disables any semantics, such as 'caption' or 'id' - as the internal options document will contain only matched elements from the input document, pay attention if you select an attribute in your xpath. doSortOptionsboolean false optional Can be set to 'true' if the options should be sorted alphabetically. This is disabled per default to avoid CPU wasting. doTrimInputboolean false optional If enabled, the input is trimms leading/trailing spaces before writing to data model enableNavPathboolean false optional Set to true if widget should be added to navpath handling. filterFunctionstring optional function name of filtering function receiving keystrokes; it gets { value, onComplete } and must call onComplete() callback once its done hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isSyncboolean false optional Uses synchronously validation when set to true. This also disables the use of asyncValidationFunction. Only necessary for setups where you can't handle waiting for the async write of data (e.g. grid widgets) isTextSelectedOnFocusboolean false optional if set, the text will be selected once the field gets a focus, so that further user input will replace the content. In case 'setCursorPositionAtEnd' is also set to true - this option has precedence. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element maxlengthinteger optional if defined, limits the input to the given length. optionsModelRelativeValueXPathxPath . optional xPath expression relative to 'optionsModelXPath' providing values optionsRendererIdstring optional * only applies to non-native implementation of this widget - to use this option you have to flag disableNativeSupport * The renderer provided here *must* exist prior binding to widget, that is it has to be known to ObjectRegistry at this time. At is recommended to construct your renderer with suppressInitialRendering=true, so that it does not run at the construction time and also provide targetHTMLElementId pointing to invisible container, since the renderer would reset containers CSS class having visual effects at construction time. Default options rendering stylesheet is located at /bcdui/widgetNg/suggestInput/optionsRenderer.xslt but you can provide your own here; the transformation has to output HTML with root element DIV containing block elements each representing an inidivual value. The children elements provides the value via bcdValue attribute. The rendered list is displayed in a dialog so user can pick-up an item. After that, the value is written to model which is found at bcdValue attribute. This way you can render complex HTML content. Recommended format is: div[div[@bcdValue]*] You can also respect current widget value i.e. to implement prefiltering, the values are provided as parameters to the stylesheet. Please refer to original stylesheet documentation for more information and parameters which are provided during transformation. the targetHTMLElementId of the renderer is automatically bound to internal options list box, the input document to this renderer is the options-model of the widget. patternstring optional regular expression pattern to validate the input placeholderi18nToken optional A default text displayed if no content was entered, this is i18n key or true for default. May be empty to display nothing. requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. setCursorPositionAtEndboolean false optional if set the cursor position will always be at the end of the input once the input field gets a focus suggestItemCountinteger 10 optional Number of items to suggest during typing, this applies to non-native implementation only. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. validationFunctionstring optional Name of a widget validator function which will be attached additionally to implicit validators. the API of given function is: validatorFunction(htmlElementId) : returns either NULL or object containing validationMessage (String or array of Strings) property, i.e. { validationMessage : String } or { validationMessage[] : String[] }, the validationMessage carries the message to be displayed to the user. The String may start with bcdui.i18n.TAG character to classify an i18n-key of the message, rather than a message itself. the args parameter is the htmlElementId of the widget to validate. Please use: bcdui.widgetNg.validation.validators.widget.getValue(htmlElementId) to properly retrieve widgets value. There is only one validator function allowed. In order to use or re-use or combine existing validations please do so in your validationFunction (that is delegate to other validators) and simply aggregate validation results into array of validationMessage[] This validator MUST ignore NULL or empty value. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. wildcardenum startswith optional The wildcards apply to filtering within the drop down list and for server side filters. This option applies only if bound to a f:Expression element and is ignored otherwise. For a f:Filter with @op='like', this controls the prefilling with wildcards ('*') when the value is yet empty and the field gets the focus. Can be 'contains', 'startswith' or 'endswith'. The user can overwrite this by adding/removing wildcards when editing the field. -
staticbcdui.widgetNg.createTextArea(args)
widgetNg/widgetPackage.js, line 258 -
Free Text input, standard HTML textarea
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description colsinteger 5 HTML Parameter on the textarea to set number of columns targetModelXPathwritableModelXPath The xPath pointing to the root-node this input widget will place entered selected items into. The underlying XML format of data written is implemented by individual widget. If pointing into a Wrs, it switches to Wrs mode, i.e. the wrs:R will be marked as modified, target node will not be deleted. asyncValidationFunctionfunction optional Like 'validationFunction' but this one must return a Promise resolving with validation result. While validating, the widget sets 'bcdValidationPending' CSS class on the owning html element. The value is written to the model after a positive validation result. If a Promise is rejected for any reason, the widget switches to invalid state. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. autogrowboolean false optional Set to true if the textarea should auto grow while typing. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 disableResetControlboolean true optional set this parameter to 'false' to enable built-in reset-control, which empties content once clicked. displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. doTrimInputboolean false optional If enabled, the input is trimms leading/trailing spaces before writing to data model enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. isSyncboolean false optional Uses synchronously validation when set to true. This also disables the use of asyncValidationFunction. Only necessary for setups where you can't handle waiting for the async write of data (e.g. grid widgets) isTextSelectedOnFocusboolean false optional if set, the text will be selected once the field gets a focus, so that further user input will replace the content. In case 'setCursorPositionAtEnd' is also set to true - this option has precedence. keepEmptyValueExpressionboolean false optional A flag that can be set to 'true' if the target node should not be removed as soon as the value is empty. TODO: better spec labeli18nToken optional If provided, enables widget to render a label element maxlengthinteger optional if defined, limits the input to the given length. patternstring optional regular expression pattern to validate the input placeholderi18nToken optional A default text displayed if no content was entered, this is i18n key or true for default. May be empty to display nothing. requiredboolean false optional An empty string or not set value is not allowed if required is true. Disabled fields are not evaluated. rowsinteger optional HTML Parameter on the textarea to set number of rows setCursorPositionAtEndboolean false optional if set the cursor position will always be at the end of the input once the input field gets a focus tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. validationFunctionstring optional Name of a widget validator function which will be attached additionally to implicit validators. the API of given function is: validatorFunction(htmlElementId) : returns either NULL or object containing validationMessage (String or array of Strings) property, i.e. { validationMessage : String } or { validationMessage[] : String[] }, the validationMessage carries the message to be displayed to the user. The String may start with bcdui.i18n.TAG character to classify an i18n-key of the message, rather than a message itself. the args parameter is the htmlElementId of the widget to validate. Please use: bcdui.widgetNg.validation.validators.widget.getValue(htmlElementId) to properly retrieve widgets value. There is only one validator function allowed. In order to use or re-use or combine existing validations please do so in your validationFunction (that is delegate to other validators) and simply aggregate validation results into array of validationMessage[] This validator MUST ignore NULL or empty value. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget. -
staticbcdui.widgetNg.createUniversalFilter(args)
widgetNg/widgetPackage.js, line 526 -
Name Type Description argsObject The parameter map contains the following properties. Name Type Default Description bRefOptionsModelXPathxPath xPath pointing to an absolute xpath (starts with $model/..) providing a node-set of available options to display. targetModelXPathwritableModelXPath $guiStatus/guiStatus:Status/f:Filter/f:And Target xPath for this filter to work with. This widget creates a filter compatible ( http://www.businesscode.de/schema/bcdui/filter-1.0.0 ) structure beyond given target element, and will use f:And, f:Or and f:Expression elements to represent the filter. You can choose either f:And, f:Or or any other element as a target. While choosing f:And/f:Or, the user will not be able do modify that root conjunction whereas there is no such restriction when using another (or custom) element as a target element. autofocusboolean optional requests the widget to set the focus once it is rendered or enabled for the first time. Only one widget can have a focus, so in case the focus is requested by many widgets it is undefined which one will win. bRefOptionsModelRelativeValueXPathxPath optional xPath expression relative to 'bRefOptionsModelXpath' providing values for options to display, if this is defined, values referenced by bRefOptionsModelXpath are treated as captions. disabledboolean false optional All input widgets can be set to be disabled. If disabled, a widget cannot receive a focus, also a style cannot be changed in many browsers. There is no read-only. Also consult read-only vs disabled: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 displayBalloonboolean false optional hints and validation messages are displayed in a fly-over if user moves the mouse over the widget. Additionally, they are also displayed in a balloon in bottom-left corner of a browser window in a balloon, which is static and appears as long as the widget has focus. enableNavPathboolean false optional Set to true if widget should be added to navpath handling. hinti18nToken optional A general feature is the hint indicator on the widget so user can hover it with a mouse to reveal information about it. image aus theme intern handled by tooltip. idstring optional Id of the widget, if not provided this id will be auto-generated. Must be unique. The id must not be used from jQuery UI API, the id should be used within declarative scope only, i.e. X-API / JSP. If provided, this id will overwrite targetHtml element's id. tabindexinteger optional the HTML compliant tabIndex targetHtmltargetHtmlRef optional An existing HTML element this widget should be attached to, provide a dom element, a jQuery element or selector, or an element id. widgetCaptionstring optional A caption which is used as prefix for navPath generation for this widget.