eb_topicCode Class
Topic code class.
Item Index
Methods
Methods
eb_topicCode.domElement
-
domElement
Page DOM element.
Parameters:
-
domElement
Objectcurrent DOM element.
eb_topicCode.getSelectedTopicCodeData
-
LinkedID
Get selected Topic code data.
Parameters:
-
LinkedID
StringUser ID.
Returns:
Returns user's selected topic of interests.
eb_topicCode.getTopicCodeData
()
Object
Get Topic code data from the server through the get service call.
Returns:
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
ObjectObject of topic of interest data.
-
ServicePath
StringService URL.
-
SitePath
StringSite URL.
-
templatePath
StringHTML path.
-
UserLinkedID
StringUser Linked ID.
-
domElement
ObjectTopic of interest DOM element.
-
allTopicCodes
ObjectArray of all topic codes.
-
selectedTopicCodes
ObjectArray of all topic codes selected by user.
-
eb_topicCode.render
-
options
To get Topic of Interest DOM element. Template path and DOM element are required parameters.
Parameters:
-
options
ObjectArray of required data.
-
ServicePath
StringService path.
-
SitePath
StringSite path.
-
UserLinkedID
StringUser's LinkedID.
-
allTopicCodes
ObjectArray of all topic codes.
-
selectedTopicCodes
ObjectArray of all selected topic codes.
-
templatePath
StringTopic of Interests HTML file path.
-
domElement
ObjectTopic of Interests DOM element.
-
Returns:
jQuery promise object which when resolved returns HTML template.
eb_topicCode.saveTopicCodeData
-
data
Save user selected topic of interests.
Parameters:
-
data
Objectarray of topic codes IDs.
Returns:
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
StringValue entered in search text-box field.
-
topicCodesList
ObjectArray of topic code objects.
eb_topicCode.topicCodesmodel
-
data
-
checked
-
parent
Converts topic code data object into knockout model.
Parameters:
-
data
ObjectSingle topic code data object.
-
checked
BooleanState of the topic code whether selected or not.
-
parent
ObjectInstance 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: '';