Forums de discussion
Accessing assets via ajax
enrico sodacci, modifié il y a 13 années.
Accessing assets via ajax
New Member Publications: 5 Date d'inscription: 15/03/11 Publications récentes
Hello everybody,
i'm new to Liferay and i'm trying to get assets via alloy's ajax facilities like this:
but i receive this json response:
and this message in logfile:
How am i supposed to pass a valid AssetEntryQuery object from the client's js? I've tried to give some values to the entryQuery parameter without any success.
Thank you.
i'm new to Liferay and i'm trying to get assets via alloy's ajax facilities like this:
Liferay.Service.Asset.AssetEntry.getEntries({
entryQuery: {},
serviceParameterTypes: A.JSON.stringify(['com.liferay.portlet.asset.service.persistence.AssetEntryQuery'])
},
function(message) {
console.debug(message);
var exception = message.exception;
if (!exception) {
console.debug(message);
}
else {
console.debug(exception);
}
});
but i receive this json response:
{"exception":"java.lang.NullPointerException"}
and this message in logfile:
Unsupported parameter type for class class com.liferay.portlet.asset.service.AssetEntryServiceUtil, method getEntries, parameter entryQuery, and type com.liferay.portlet.asset.service.persistence.AssetEntryQuery
How am i supposed to pass a valid AssetEntryQuery object from the client's js? I've tried to give some values to the entryQuery parameter without any success.
Thank you.