掲示板

Liferay.Service

thumbnail
9年前 に Pablo Zapico によって更新されました。

Liferay.Service

Junior Member 投稿: 48 参加年月日: 10/06/02 最新の投稿
Could make calls to the segments with Liferay.Service from js?

I´m tryng:

Liferay.Service(
'/usersegment/get-usersegments',
{
groupId: 10718
},
function(obj) {
console.log(obj);
}
);
thumbnail
9年前 に Julio Camarero によって更新されました。

RE: Liferay.Service (回答)

Liferay Legend 投稿: 1668 参加年月日: 08/07/15 最新の投稿
Hi Pablo,

yes you can do it.

I just build a sample portlet to test this and I have pushed my code to github so that you can see how it works.

You can see the latest commits in this branch (those which start with Sample API Client).

Also, for more information about how to use the JS services, you can access this URL in your server to see all your API available, examples and documentation:
http://localhost:8080/api/jsonws

Changing the context path to Content Targeting you will be able to see all the things you can do from Javascript with code examples.

Cheers!