留言板

adding custom portlet data to journal article table.

Ashwani Kumar,修改在11 年前。

adding custom portlet data to journal article table.

Junior Member 帖子: 26 加入日期: 12-10-19 最近的帖子
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,修改在11 年前。

RE: adding custom portlet data to journal article table.

Liferay Master 帖子: 522 加入日期: 11-8-29 最近的帖子
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,修改在11 年前。

RE: adding custom portlet data to journal article table.

Junior Member 帖子: 26 加入日期: 12-10-19 最近的帖子
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