Fórumok

adding custom portlet data to journal article table.

Ashwani Kumar, módosítva 11 év-val korábban

adding custom portlet data to journal article table.

Junior Member Bejegyzések: 26 Csatlakozás dátuma: 2012.10.19. Legújabb bejegyzések
Hi All,

In my custom portlet having few fields which represent a single record,how can I make this record as a web content ??

thanks in advance ,

Regards
-
Ashwani
thumbnail
Bart Simpson, módosítva 11 év-val korábban

RE: adding custom portlet data to journal article table.

Liferay Master Bejegyzések: 522 Csatlakozás dátuma: 2011.08.29. Legújabb bejegyzések
I am not sure why you want to add a web content when you have the custom portlet, you can create a new entity and store the data there. (http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/service-build-5)
Anyways, To add a journal article use the method below
JournalArticle com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil.addArticle(long userId, long groupId, long classNameId, long classPK, String articleId, boolean autoArticleId, double version, Map<locale, string> titleMap, Map<locale, string> descriptionMap, String content, String type, String structureId, String templateId, String layoutUuid, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, int reviewDateMonth, int reviewDateDay, int reviewDateYear, int reviewDateHour, int reviewDateMinute, boolean neverReview, boolean indexable, boolean smallImage, String smallImageURL, File smallImageFile, Map<string, byte[]> images, String articleURL, ServiceContext serviceContext) throws PortalException, SystemException</string,></locale,></locale,>


if you are not able to fit you data in the fields that JournalArticle provides, you can use expand fields of web content.
Please provide more information on what you want to achieve, there may be better approach to do it.
Ashwani Kumar, módosítva 11 év-val korábban

RE: adding custom portlet data to journal article table.

Junior Member Bejegyzések: 26 Csatlakozás dátuma: 2012.10.19. Legújabb bejegyzések
Hi Bart,

Thanks for your response.
I have been stuck in the problem describe at.

http://www.liferay.com/community/forums/-/message_boards/message/18757454

http://www.liferay.com/community/forums/-/message_boards/message/18708699

Since i am not able to find the solution problem given in above mentioned thread. so i was just move to this approach for my requirement. let me know if my problem is cleared.

Thanks
-
Ashwan Kumar