API Docs for:
Show:

eb_topicCode Class

Topic code class.

Methods

eb_topicCode.domElement

(
  • domElement
)

Page DOM element.

Parameters:

  • domElement Object

    current DOM element.

eb_topicCode.getSelectedTopicCodeData

(
  • LinkedID
)
Object

Get selected Topic code data.

Parameters:

  • LinkedID String

    User ID.

Returns:

Object:

Returns user's selected topic of interests.

eb_topicCode.getTopicCodeData

() Object

Get Topic code data from the server through the get service call.

Returns:

Object:

Returns list of available topic of interests.

eb_topicCode.model

(
  • topicOfInterestData
)

It is class module which is responsible for binding data, events and validation of the fields.

Parameters:

  • topicOfInterestData Object

    Object of topic of interest data.

    • ServicePath String

      Service URL.

    • SitePath String

      Site URL.

    • templatePath String

      HTML path.

    • UserLinkedID String

      User Linked ID.

    • domElement Object

      Topic of interest DOM element.

    • allTopicCodes Object

      Array of all topic codes.

    • selectedTopicCodes Object

      Array of all topic codes selected by user.

eb_topicCode.render

(
  • options
)
String

To get Topic of Interest DOM element. Template path and DOM element are required parameters.

Parameters:

  • options Object

    Array of required data.

    • ServicePath String

      Service path.

    • SitePath String

      Site path.

    • UserLinkedID String

      User's LinkedID.

    • allTopicCodes Object

      Array of all topic codes.

    • selectedTopicCodes Object

      Array of all selected topic codes.

    • templatePath String

      Topic of Interests HTML file path.

    • domElement Object

      Topic of Interests DOM element.

Returns:

String:

jQuery promise object which when resolved returns HTML template.

eb_topicCode.saveTopicCodeData

(
  • data
)
Object

Save user selected topic of interests.

Parameters:

  • data Object

    array of topic codes IDs.

Returns:

Object:

Returns array of topic code IDs that are saved.

eb_topicCode.searchTopicCodes

(
  • toSearch
  • topicCodesList
)

Topic code search function. Computed function returns array of topic code objects.

Parameters:

  • toSearch String

    Value entered in search text-box field.

  • topicCodesList Object

    Array of topic code objects.

eb_topicCode.topicCodesmodel

(
  • data
  • checked
  • parent
)

Converts topic code data object into knockout model.

Parameters:

  • data Object

    Single topic code data object.

  • checked Boolean

    State of the topic code whether selected or not.

  • parent Object

    Instance of eb_topicCode.model.

Properties

eb_topicCode.defaultErrorMessage

String

Default error message.

eb_topicCode.errorResponses

Object

Globally defined error codes object for the control. Every error code should have boolean 'useServerMessage' attribute, which when true suggests we are showing service error message on the UI. If the 'useServerMessage' is defined as false, then provide another attribute 'frontEndMessage' with the error string which will be shown on UI. If 'useServerMessage' is false and 'frontEndMessage' is not defined, default error message will be shown. If service error response contains error code not defined in this object then default error message will be shown.

eb_topicCode.getSelectedTopicCodeService

String

Selected Interests service path

eb_topicCode.getTopicCodeService

String

Topic of Interest service path

eb_topicCode.saveTopicCodeService

String

Service path for saving selected Topic of Interests.

eb_topicCode.ServicePath

String

SOA path. It would be set from configuration file.

eb_topicCode.SitePath

String

Site path. It would be set from configuration file.

eb_topicCode.topicOfInterest

String

Topic of Interest site path. It would be set from configuration file.

eb_topicCode.UserLinkedID

String

Stores user's LinkedID. It is required to get saved interests and to save selected interests of the user.

Default: '';