Class sap.ca.ui.NotesModule: sap/ca/ui/Notes

extends List

This control is a List with the ability to render an additional control on top of it to add new notes. The developer is responsible to give the correct template to use to display notes (recommended are either the FeedListItem or the ExpansibleFeedListItem). The developer is also responsible to implement the code to send the notes to the backend system, by responding to the addNote event.

Deprecated API:Since version 1.22. This control has been made available in sap.m. Please use sap.m.FeedInput with sap.m.FeedListItem instead! This control will not be supported anymore.

Constructor Summary
new sap.ca.ui.Notes(sId?, mSettings?)Constructor for a new Notes.
Event Summary
addNote(oControlEvent)press event for button

(oControlEvent) Event is fired when the user clicks on the control.

Events borrowed from class sap.ui.core.Control
Method Summary
sap.ca.ui.Notes.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ca.ui.Notes with name sClassName and enriches it with the information contained in oClassInfo.
sap.ca.ui.Notes.getMetadata()Returns a metadata object for class sap.ca.ui.Notes.
attachAddNote(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'addNote' event of this sap.ca.ui.Notes.
detachAddNote(fnFunction, oListener)Detach event handler fnFunction from the 'addNote' event of this sap.ca.ui.Notes.
fireAddNote(mArguments?)Fire event addNote to attached listeners.
getPlaceholder()Getter for property placeholder.
getShowNoteInput()Getter for property showNoteInput.
getTextMaxLength()Getter for property textMaxLength.
setPlaceholder(sPlaceholder)Setter for property placeholder.
setShowNoteInput(bShowNoteInput)Setter for property showNoteInput.
setTextMaxLength(iTextMaxLength)Setter for property textMaxLength.
Methods borrowed from class sap.m.ListBase
addAriaLabelledBy, addItem, attachDelete, attachGrowingFinished, attachGrowingStarted, attachItemPress, attachSelect, attachSelectionChange, attachSwipe, attachUpdateFinished, attachUpdateStarted, bindItems, destroyHeaderToolbar, destroyInfoToolbar, destroyItems, destroySwipeContent, detachDelete, detachGrowingFinished, detachGrowingStarted, detachItemPress, detachSelect, detachSelectionChange, detachSwipe, detachUpdateFinished, detachUpdateStarted, fireDelete, fireGrowingFinished, fireGrowingStarted, fireItemPress, fireSelect, fireSelectionChange, fireSwipe, fireUpdateFinished, fireUpdateStarted, getAriaLabelledBy, getEnableBusyIndicator, getFooterText, getGrowing, getGrowingInfo, getGrowingScrollToLoad, getGrowingThreshold, getGrowingTriggerText, getHeaderDesign, getHeaderText, getHeaderToolbar, getIncludeItemInSelection, getInfoToolbar, getInset, getItemNavigation, getItems, getKeyboardMode, getLastMode, getMode, getModeAnimationOn, getNoDataText, getRememberSelections, getSelectedContexts, getSelectedItem, getSelectedItems, getShowNoData, getShowSeparators, getShowUnread, getSwipeContent, getSwipeDirection, getSwipedItem, getWidth, indexOfItem, insertItem, removeAllAriaLabelledBy, removeAllItems, removeAriaLabelledBy, removeItem, removeSelections, selectAll, setEnableBusyIndicator, setFooterText, setGrowing, setGrowingScrollToLoad, setGrowingThreshold, setGrowingTriggerText, setHeaderDesign, setHeaderText, setHeaderToolbar, setIncludeItemInSelection, setInfoToolbar, setInset, setKeyboardMode, setMode, setModeAnimationOn, setNoDataText, setRememberSelections, setSelectedItem, setSelectedItemById, setShowNoData, setShowSeparators, setShowUnread, setSwipeContent, setSwipeDirection, setWidth, swipeOut, unbindItems
Constructor Detail
new sap.ca.ui.Notes(sId?, mSettings?)
Constructor for a new Notes.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).

The supported settings are:

  • Properties
  • Aggregations
    • Associations
      • Events
        • addNote : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

      In addition, all settings applicable to the base type sap.m.List can be used as well.

      Parameters:
      {string}sId? id for the new control, generated automatically if no id is given
      {object}mSettings? initial settings for the new control
      Deprecated:
      Since version 1.22. This control has been made available in sap.m. Please use sap.m.FeedInput with sap.m.FeedListItem instead! This control will not be supported anymore.
      Event Detail
      addNote(oControlEvent)
      press event for button

      (oControlEvent) Event is fired when the user clicks on the control.

      fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

      Parameters:
      {sap.ui.base.Event}oControlEvent
      {sap.ui.base.EventProvider}oControlEvent.getSource
      {object}oControlEvent.getParameters
      Method Detail
      sap.ca.ui.Notes.extend(sClassName, oClassInfo?, FNMetaImpl?): function
      Creates a new subclass of class sap.ca.ui.Notes with name sClassName and enriches it with the information contained in oClassInfo.

      oClassInfo might contain the same kind of informations as described in Element.extend.

      Parameters:
      {string}sClassName name of the class to be created
      {object}oClassInfo? object literal with informations about the class
      {function}FNMetaImpl? constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
      Returns:
      {function} the created class / constructor function
      sap.ca.ui.Notes.getMetadata(): sap.ui.base.Metadata
      Returns a metadata object for class sap.ca.ui.Notes.
      Returns:
      {sap.ui.base.Metadata} Metadata object describing this class
      attachAddNote(oData?, fnFunction, oListener?): sap.ca.ui.Notes
      Attach event handler fnFunction to the 'addNote' event of this sap.ca.ui.Notes.
      . When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.ca.ui.Notes.
      itself.

      press event for button

      (oControlEvent) Event is fired when the user clicks on the control.

      fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

      Parameters:
      {object}oData? An application specific payload object, that will be passed to the event handler along with the event object when firing the event.
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener? Context object to call the event handler with. Defaults to this sap.ca.ui.Notes.
      itself.
      Returns:
      {sap.ca.ui.Notes}this to allow method chaining
      detachAddNote(fnFunction, oListener): sap.ca.ui.Notes
      Detach event handler fnFunction from the 'addNote' event of this sap.ca.ui.Notes.

      The passed function and listener object must match the ones used for event registration.

      Parameters:
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener Context object on which the given function had to be called.
      Returns:
      {sap.ca.ui.Notes}this to allow method chaining
      fireAddNote(mArguments?): sap.ca.ui.Notes
      Fire event addNote to attached listeners.
      Parameters:
      {Map}mArguments? the arguments to pass along with the event.
      Returns:
      {sap.ca.ui.Notes}this to allow method chaining
      getPlaceholder(): string
      Getter for property placeholder. Placeholder text shown when no value available . Default value is "Add note".

      Default value is empty/undefined

      Returns:
      {string} the value of property placeholder
      getShowNoteInput(): boolean
      Getter for property showNoteInput. If set to true, this control will render an additional control to create new notes.

      Default value is true

      Returns:
      {boolean} the value of property showNoteInput
      getTextMaxLength(): int
      Getter for property textMaxLength. max text input length

      Default value is 1000

      Returns:
      {int} the value of property textMaxLength
      setPlaceholder(sPlaceholder): sap.ca.ui.Notes
      Setter for property placeholder.

      Default value is empty/undefined

      Parameters:
      {string}sPlaceholder new value for property placeholder
      Returns:
      {sap.ca.ui.Notes}this to allow method chaining
      setShowNoteInput(bShowNoteInput): sap.ca.ui.Notes
      Setter for property showNoteInput.

      Default value is true

      Parameters:
      {boolean}bShowNoteInput new value for property showNoteInput
      Returns:
      {sap.ca.ui.Notes}this to allow method chaining
      setTextMaxLength(iTextMaxLength): sap.ca.ui.Notes
      Setter for property textMaxLength.

      Default value is 1000

      Parameters:
      {int}iTextMaxLength new value for property textMaxLength
      Returns:
      {sap.ca.ui.Notes}this to allow method chaining