Forums de discussion

adding custom portlet data to journal article table.

Ashwani Kumar, modifié il y a 11 années.

adding custom portlet data to journal article table.

Junior Member Publications: 26 Date d'inscription: 19/10/12 Publications récentes
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, modifié il y a 11 années.

RE: adding custom portlet data to journal article table.

Liferay Master Publications: 522 Date d'inscription: 29/08/11 Publications récentes
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, modifié il y a 11 années.

RE: adding custom portlet data to journal article table.

Junior Member Publications: 26 Date d'inscription: 19/10/12 Publications récentes
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