参数"obc"的内容是什么? Liferay中的/dlfolder/get-folders Restful API? [英] what the content of the parameter "obc" for /dlfolder/get-folders restful api in liferay?

查看:106
本文介绍了参数"obc"的内容是什么? Liferay中的/dlfolder/get-folders Restful API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Liferay中的静态api /dlfolder/get-folders的参数obc要求类型为com.liferay.portal.kernel.util.OrderByComparator.

The parameter obc for restful api /dlfolder/get-folders in liferay requires the type com.liferay.portal.kernel.util.OrderByComparator.

我尝试了许多可能的值,但始终收到错误消息

I tried many possible values but always got the error message

无法将值转换为以下类型:com.liferay.portal.kernel.util.OrderByComparator

Unable to cast value to type: com.liferay.portal.kernel.util.OrderByComparator

现在,我陷入了这个问题. 有谁知道应该在此参数中加上什么值,请教我,谢谢.

Now I got stuck in this problem. Is anyone who know what the value should be put in this parameter, please teach me, thx.

推荐答案

当有对象作为参数时,必须在参数前放置+,并像这样将全名类的分隔符:

When there are object as parameters have to put + before the parameter and : as saparator of full name class like this

http://localhost:8080/api/jsonws/dlfolder/get-folders/group-id/0/parent-folder-id/0/start/0/end/10/+obc:com.liferay.portlet.documentlibrary.util.comparator.FolderNameComparator

或javascript

or javascript

Liferay.Service(
  '/dlfolder/get-folders',
  {
    groupId: 0,
    parentFolderId: 0,
    start: 0,
    end: 10,
    "+obc":"com.liferay.portlet.documentlibrary.util.comparator.FolderNameComparator"
  },
  function(obj) {
    console.log(obj);
  }
);

更多信息的文档链接 https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/invoking-json-web-services#object-parameters

这篇关于参数"obc"的内容是什么? Liferay中的/dlfolder/get-folders Restful API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆