Fórum

How to make custom asset in liferay 7?

thumbnail
Abhishek Jain, modificado 7 Anos atrás.

How to make custom asset in liferay 7?

Regular Member Postagens: 226 Data de Entrada: 20/08/16 Postagens Recentes
I am following the tutorial on https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/adding-updating-and-deleting-assets-for-custom-entities. I created a custom entity named School3. In -School3LocalServiceImpl, I am invoking a method like as follows:-

@Override
public School3 updateSchool3(School3 school3) {
AssetEntry assetEntry = assetEntryLocalService.updateEntry(
userId, School3.getGroupId(), page.getCreateDate(),
page.getModifiedDate(), School3.class.getName(),
page.getResourcePrimKey(), page.getUuid(), 0,
assetCategoryIds, assetTagNames, true, true, null, null,
page.getCreateDate(), null, ContentTypes.TEXT_HTML,
page.getTitle(), null, null, null, null, 0, 0, null);

return super.updateSchool3(school3);
}


Here page is not resolved. How to initialize it? Please help. Any help would be appreciated.
thumbnail
Pankaj Kathiriya, modificado 7 Anos atrás.

RE: How to make custom asset in liferay 7? (Resposta)

Liferay Master Postagens: 722 Data de Entrada: 05/08/10 Postagens Recentes
You should not follow example blindly.
It clearly says that the example code is from class WikiPageLocalServiceImpl that means that page object referring to wiki page.
thumbnail
Abhishek Jain, modificado 7 Anos atrás.

RE: How to make custom asset in liferay 7?

Regular Member Postagens: 226 Data de Entrada: 20/08/16 Postagens Recentes
Thanks Pankaj ... I am sorry for the blunder I committed..