JBoss.orgCommunity Documentation

ForumLinkEvent

This event is fired through UIForumLinkPortlet.

To receive ForumLinkEvent, you must use the ForumParameter class with two properties:

Name Type Possible value Description
isRenderForumLink boolean true/false If the value is set to true or false, the Forum link is rendered or not respectively.
path string The absolute path of the class node (including types: category, forum, topic) defined by JCR. Set data for the UIForumLinkPortlet.

For example:



PortletRequestContext pcontext = (PortletRequestContext) WebuiRequestContext.getCurrentInstance();
ActionResponse actionRes = (ActionResponse) pcontext.getResponse();
ForumParameter param = new ForumParameter();
String path = forum.getPath();
if ( ...condition to render the UIForumLinkPortlet... ) {
  param.setRenderForumLink(true);
  param.setPath(path);
} else {
  param.setRenderForumLink(false);
}
actionRes.setEvent(new QName("ForumLinkEvent"), param) ;