小编asw*_*yak的帖子

没有为响应类ArrayList找到消息正文编写器

当我试图返回List时,它已经找到了没有消息体编写器的响应类ArrayList.

我的代码如下:

@POST 
@Path("/{scope}/{application}/tables")
@Produces("application/xml")
public List<String> getTableNames(@PathParam("scope") String scope,
    @PathParam("application") String application, Request request) {

    // For example, I am returning a list of String
    return new ArrayList<String>(4);
}
Run Code Online (Sandbox Code Playgroud)

请帮我.提前致谢

java web-services cxfrs

12
推荐指数
1
解决办法
5万
查看次数

如何在mongodb中找到匹配的记录?

我在我的收藏中有一个记录,我想获取id为1的人的详细信息.但我得到的细节是2次而不是1次.

    db.mycollection.insert({"person" : [ { "id":1, "details" : { "name" : "Aswini", "Age" : 10 }}, { "id":2, "details" : { "name" : "Mahesh", "Age" : 11}}]})
Run Code Online (Sandbox Code Playgroud)

然后跑

    > db.mycollection.findOne({"person.id":1},{"person.details":1,"_id":0})
Run Code Online (Sandbox Code Playgroud)

结果是:

    {
        "person" : 
                [
                    {
                        "details" : 
                        {
                         "name" : "Aswini",
                         "Age" : 10
                        }
                    },
                    {
                        "details" : 
                        {
                         "name" : "Mahesh",
                         "Age" : 11
                        }
                    }
                ]
    }
Run Code Online (Sandbox Code Playgroud)

但我需要如下:

    {
    "person" : [
                {
                "details" : {
                            "name" : "Aswini",
                            "Age" : 10
                        }
                }
            ]
    } …
Run Code Online (Sandbox Code Playgroud)

java find mongodb

5
推荐指数
1
解决办法
5018
查看次数

带有LabelAlign顶部的ExtJS文本字段(CENTER)

是否有任何配置选项将lavel放在顶部,中心对齐文本字段.

  {
    xtype:'numberfield',
    labelAlign:'top',
    labelSeparator:'',
    fieldLabel: 'Title',
    flex:1 
  }
Run Code Online (Sandbox Code Playgroud)

它的工作正常,标签在顶部,但与左边对齐.我想要与顶级中心对齐.

谢谢你的帮助!

extjs textfield extjs4 extjs4.1

4
推荐指数
1
解决办法
7109
查看次数

如何将带有参数化构造函数的服务注入到组件中 - Angular

创建一个服务类(CourseService):

带有参数化构造函数的服务类

 import { Injectable } from '@angular/core';

  @Injectable()
  export class CourseService {

  constructor(private name?:string) { }

  getName() : string{
    return "Service Name is"+ this.name;
  }

}
Run Code Online (Sandbox Code Playgroud)

将服务注入组件。

在 Provider 中,它已经像这样注入了

  providers: [
    CourseService
  ]
Run Code Online (Sandbox Code Playgroud)

创建组件类

    import { Component, OnInit } from '@angular/core';
    import { CourseService } from '../../services/course.service';

    @Component({
      selector: 'app-course',
      templateUrl: './course.component.html',
      styleUrls: ['./course.component.css']
    })
    export class CourseComponent implements OnInit {

      constructor(private courseService: CourseService) { }

      ngOnInit() {

        let serviceName = this.courseService.getName();
      }

    }
Run Code Online (Sandbox Code Playgroud)

浏览器控制台错误:

 AppComponent.html:1 ERROR Error: …
Run Code Online (Sandbox Code Playgroud)

dependency-injection angular

4
推荐指数
1
解决办法
1509
查看次数

Ext JS 4无线电组检查事件

我正在使用FormPanel内部的xtype在extJS 4中创建一个radioGroup.我正在尝试在检查无线电时启用/禁用文本字段.

{
xtype: 'radiogroup',
fieldLabel: 'Enable / Disable ',
columns: 2,
vertical: true,
items: [
     {boxLabel: 'Enable', name: 'formtype', inputValue: '1'},
     {boxLabel: 'Disable', name: 'formtype', inputValue:'2',checked:true},
    ]
 }
Run Code Online (Sandbox Code Playgroud)

我很困惑在哪里添加检查/点击事件的监听器.非常感谢提前.

extjs radio-group radio-button ext4

3
推荐指数
1
解决办法
2万
查看次数

如何在设置记录数据时屏蔽Extjs网格并在设置后取消屏蔽?

我在一个有5列的网格中一次显示1500到2000条记录.工具栏上有一个组合框.当有组合更改时,我需要更新2列数据.为此,我正在阅读商店并设置每条记录的值(2列).我从另一个JsonStore得到的2列的值是什么.

由于有超过1000条记录需要花一些时间来更新2列数据.现在我试图在组合更改后屏蔽网格,并在设置所有记录后unmsak().

如何在所有记录值设置后取消屏蔽网格?

提前致谢!!!!

grid extjs extjs4 extjs4.1

3
推荐指数
1
解决办法
5977
查看次数

org.hibernate.MappingException:没有JDBC类型的Dialect映射:-9

当我尝试从SQLServer2008中的表中获取记录时,我得到了一个名为:org.hibernate.MappingException的异常:没有JDBC类型的Dialect映射:-9为什么?

虽然配置文件是正确的.

jdbc

2
推荐指数
2
解决办法
8982
查看次数

如何使用分组功能使用 ExpandAll 和 CollapseAll 进行分组网格

我正在尝试使用expandAll() 和collapseAll() 进行分组网格Ext 4.1

但它在覆盖后不起作用:出现错误 ExpandAll() is not Defined

            Ext.override(Ext.grid.feature.Grouping, {
                  collapseAll: function() {
                    var self = this, view = self.view;
                    view.el.query(self.eventSelector).forEach(function (group) {
                      var group_body = Ext.fly(group.nextSibling, '_grouping');
                      self.collapse(group_body);
                    });
                  },

                  expandAll: function() {
                    var self = this, view = self.view;
                    view.el.query(self.eventSelector).forEach(function (group) {
                      var group_body = Ext.fly(group.nextSibling, '_grouping');
                      self.expand(group_body);
                    });
                  }
                });
Run Code Online (Sandbox Code Playgroud)

这是我的视图文件:

 Ext.define('MCT.view.MyGrid',
   {
     extend:'Ext.grid.Panel',
     initComponent:function(){
       var me  = this;
       this.bbar = [{xtype:'button',text:'Expand All', handler:function(){

          me.features[0].expandAll();

          this.callParent(arguments);


        }}];
     },
     features : [{
        ftype : 'grouping',
                    groupHeaderTpl :'.......', …
Run Code Online (Sandbox Code Playgroud)

grid grouping extjs extjs4

1
推荐指数
1
解决办法
9502
查看次数