Я использую IBM lightlight 6.1 и backbone.js для моего проекта мобильных приложений. Мой вопрос заключается в том, как интегрировать адаптер рабочего света с опорным представлением?IBM Worklight 6.1 - Как интегрировать адаптер рабочей подсветки с основным видом?
Worklight адаптер
Username.xml
<wl:adapter name="Username"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wl="http://www.worklight.com/integration"
xmlns:http="http://www.worklight.com/integration/http">
<displayName>Username</displayName>
<description>Username</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>example.com</domain>
<port>9081</port>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="getUsername"> </procedure>
</wl:adapter>
Имя пользователя-impl.js
function getUsername(userAlias,locale) {
path = "rest-rib/service/Login/login_username?userAlias=" + userAlias + "&locale=" + locale;
var input = {
method : 'post',
returnedContentType : 'json',
path : path
};
return WL.Server.invokeHttp(input);
}
BackboneView
HomeView.js
define(['jquery', 'underscore', 'backbone', 'text!modules/home/homeViewTemplate.html'], function($, _, Backbone, homeViewTemplate) {
var HomeView = Backbone.View.extend({
initialize: function() {
this.$el.off();
},
render: function() {
this.$el.html(homeViewTemplate);
},
});
return HomeView;
});
Большое спасибо.