A View defined using JSON.
Constructor for a new mvc/JSONView.
Note: Application code shouldn't call the constructor directly, but rather use the factory JSONView.create or View.create with type JSON. The factory simplifies asynchronous loading of a view and future features might be added to the factory only.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
This class does not have its own settings, but all settings applicable to the base type sap.ui.core.mvc.View can be used.
new sap.ui.core.mvc.JSONView(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
displayBlock | boolean | false | Whether the CSS display should be set to "block". Set this to "true" if the default display "inline-block" causes a vertical scrollbar with Views that are set to 100% height. Do not set this to "true" if you want to display other content in the same HTML parent on either side of the View (setting to "true" may push that other content to the next/previous line). Visibility: public |
height | sap.ui.core.CSSSize | The height Visibility: public |
|
viewName | string | Name of the View Visibility: public |
|
width | sap.ui.core.CSSSize | 100% | The width Visibility: public |
blocked | boolean | false | Whether the control is currently in blocked state. Visibility: public |
busy | boolean | false | Whether the control is currently in busy state. Visibility: public |
busyIndicatorDelay | int | 1000 | The delay in milliseconds, after which the busy indicator will show up for this control. Visibility: public |
busyIndicatorSize | sap.ui.core.BusyIndicatorSize | Medium | The size of the BusyIndicator. For controls with a width smaller 3rem a |
fieldGroupIds | string[] | The IDs of a logical field group that this control belongs to. All fields in a logical field group should share the same For backward compatibility with older releases, field group IDs are syntactically not limited, but it is suggested to use only valid sap.ui.core.IDs. See #attachValidateFieldGroup or consult the Field Group documentation. |
|
visible | boolean | true | Whether the control should be visible on the screen. If set to false, a placeholder will be rendered to mark the location of the invisible control in the DOM of the current page. The placeholder will be hidden and have zero dimensions ( Also see InvisibleRenderer. Visibility: public |
Name | Cardinality | Type | Description |
---|---|---|---|
content | 0..n | sap.ui.core.Control |
Child Controls of the view |
customData | 0..n | sap.ui.core.CustomData |
Custom Data, a data structure like a map containing arbitrary key value pairs. |
dependents | 0..n | sap.ui.core.Element |
Dependents are not rendered, but their databinding context and lifecycle are bound to the aggregating Element. |
dragDropConfig | 0..n | sap.ui.core.dnd.DragDropBase |
Defines the drag-and-drop configuration. Note: This configuration might be ignored due to control metadata restrictions. |
layoutData | 0..1 | sap.ui.core.LayoutData |
Defines the layout constraints for this control when it is used inside a Layout. LayoutData classes are typed classes and must match the embedding Layout. See VariantLayoutData for aggregating multiple alternative LayoutData instances to a single Element. |
tooltip | 0..1 | sap.ui.core.TooltipBase |
The tooltip that should be shown for this Element. In the most simple case, a tooltip is a string that will be rendered by the control and displayed by the browser when the mouse pointer hovers over the control's DOM. In this variant, Controls need to explicitly support this kind of tooltip as they have to render it, but most controls do. Exceptions will be documented for the corresponding controls (e.g. Alternatively, UI5 currently does not provide a recommended implementation of See the section Using Tooltips
|
Method | Description |
---|---|
sap.ui.core.mvc.JSONView.create |
Creates a JSON view of the given configuration. |
sap.ui.core.mvc.JSONView.extend |
Creates a new subclass of class sap.ui.core.mvc.JSONView with name
|
sap.ui.core.mvc.JSONView.getMetadata |
Returns a metadata object for class sap.ui.core.mvc.JSONView. |
Creates a JSON view of the given configuration.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOptions | object |
An object containing the view configuration options. |
|
id | string |
Specifies an ID for the view instance. If no ID is given, an ID will be generated. |
|
viewName | string |
The view name (in dot-notation) that corresponds to a JSON resource that can be loaded via the module system (viewName + suffix ".view.json"). |
|
definition | string object |
view definition as a JSON string or an object literal |
|
controller | sap.ui.core.mvc.Controller |
Controller instance to be used for this view. The given controller instance overrides the controller defined in the view definition. Sharing a controller instance between multiple views is not supported. |
Creates a new subclass of class sap.ui.core.mvc.JSONView with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.mvc.View.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |