Fórumok
Subscription to WIKI comments via code
Jan Tošovský, módosítva 12 év-val korábban
Subscription to WIKI comments via code
Liferay Master Bejegyzések: 566 Csatlakozás dátuma: 2010.07.22. Legújabb bejegyzések
Hello Everyone,
it is possible to subscribe to the WIKI page:
But watching of comments to this page requires another subscription (a new functionality available in 6.1.x).
Comments in WIKI page are handled using the discussion tag:
How can I obtain the correct class name and primary key to modify the following code?
it is possible to subscribe to the WIKI page:
public void subscribePage(long userId, long nodeId, String title)
throws PortalException, SystemException {
WikiPage page = getPage(nodeId, title);
subscriptionLocalService.addSubscription(
userId, page.getGroupId(), WikiPage.class.getName(),
page.getResourcePrimKey());
}
But watching of comments to this page requires another subscription (a new functionality available in 6.1.x).
Comments in WIKI page are handled using the discussion tag:
<liferay-ui:discussion className="<%= WikiPage.class.getName() %>" classPK="<%= wikiPage.getResourcePrimKey() %>" formAction="<%= discussionURL %>" formName="fm2" ratingsEnabled="<%= enableCommentRatings %>" redirect="<%= currentURL %>" subject="<%= wikiPage.getTitle() %>" userId="<%= wikiPage.getUserId() %>" />
How can I obtain the correct class name and primary key to modify the following code?
SubscriptionLocalService.addSubscription(userId, MBThread.class.getName(), message.getThreadId());
Jan Tošovský, módosítva 12 év-val korábban
RE: Subscription to WIKI comments via code (Válasz)
Liferay Master Bejegyzések: 566 Csatlakozás dátuma: 2010.07.22. Legújabb bejegyzések
I've just noticed that WIKI page subscription automatically sets also comments subscription and vice versa. So this was false alarm from my side.