ASP.Net Boilerplate& JTable中

时间:2014-11-16 12:58:58

标签: asp.net asp.net-mvc boilerplate

我研究过ASP.Net boilderplate模板(http://www.aspnetboilerplate.com/Templates)并进行了一些自定义更改。 我有一个" GetComponentDataList()"我服务中的方法。我玩弄了它并将其渲染为如下所示的列表:

 <!-- Component list    -->
 <ul class="list-group" ng-repeat="component in vm.components">
    <div class="list-group-item">
        <br />
        <span>Entry:</span>
        <span>{{component.entry}}</span>
    </div>
 </ul>

components.js代码:

vm.refreshComponents = function () {
            abp.ui.setBusy( //Set whole page busy until getComponentDataList complete
               null,
               componentDataService.getComponentDataList( //Call application service method directly from javascript
               ).success(function (data) {
                   vm.components = data.componentData;
               })

           );
        };

现在我想通过jTable渲染组件。 jTable期望一个动作来获取数据列表:

listAction: '/api/services/app/componentData/GetComponentDataList',

如何在样板模板中使用jTable?

     1. Do I need to add a method in my "HomeController" to use jTable?
     2. The result of my "GetComponentDataList" method in my service is of type IOutputDto.
        That means the result of my service is not directly a list. There is one indirection
        level inbetween. Seems like this does not fit together.
     3. Can I provide a function in my JS-ViewModel and use that function instead of an action URL?

任何暗示都会很棒。

THX。