JBoss.orgCommunity Documentation

ForumRuleEvent

This event is fired through UIForumRulePortlet.

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

Name Type Possible value Description
isRenderRule boolean True/false If the value is set to true or false, the UIForumRulePortlet portlet is rendered or not respectively.
infoRules list of strings The list of states: can create topic, can add post and topic has lock. Set permissions for users in UIForumRulePortlet.

For example:



....
ActionResponse actionRes = pcontext.getResponse() ;
ForumParameter param = new ForumParameter() ;
List<String> list = param.getInfoRules();
if(forum.getIsClosed() || forum.getIsLock()) {
  list.set(0, "true");
} else {
  list.set(0, "false");
}
list.set(1, String.valueOf(canCreateTopic));
list.set(2, String.valueOf(isCanPost));
param.setInfoRules(list);
param.setRenderRule(true);
actionRes.setEvent(new QName("ForumRuleEvent"), param) ;
....