Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ashwani Kumar
adding custom portlet data to journal article table.
December 21, 2012 5:41 AM
Answer

Ashwani Kumar

Rank: Junior Member

Posts: 26

Join Date: October 19, 2012

Recent Posts

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
Bart Simpson
RE: adding custom portlet data to journal article table.
December 21, 2012 7:00 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 524

Join Date: August 29, 2011

Recent Posts

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
1JournalArticle 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


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
RE: adding custom portlet data to journal article table.
December 21, 2012 8:40 AM
Answer

Ashwani Kumar

Rank: Junior Member

Posts: 26

Join Date: October 19, 2012

Recent Posts

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