留言板

Possible to adjust Announcements Portlet to post to multiple scopes?

Joshua Bertrand,修改在10 年前。

Possible to adjust Announcements Portlet to post to multiple scopes?

New Member 帖子: 17 加入日期: 12-5-1 最近的帖子
Hello,

I have been tasked with trying to find a solution within Liferay 6.1 EE GA1 to publish an Announcement where the author of the announcement can select multiple audiences (roles in this case) to view the same message.

Unfortunately I have limited (really... no experience emoticon ) experience with java, but I have at least been able to Hook the Announcements Portlet to change entry_select_scope.jspf view by adding mutliple="true" in aui:select. But unfortunately, it will still only post the announcement to the first selection.

Can anyone point me in the right direction on what I can do to make the announcement post to each scope selection or is there another solution for my end goal? Any help or advice anyone can provide is greatly appreciated.

Thank you
thumbnail
Jeffrey Handa,修改在10 年前。

RE: Possible to adjust Announcements Portlet to post to multiple scopes?

Liferay Master 帖子: 541 加入日期: 08-12-1 最近的帖子
Hi Joshua,

When modifying any of Liferay's core portlets to behave differently, there are a couple of things you should look at.

1) First, determine if Liferay has already provided this option as a configuration in portal.properties. After searching portal.properties for ## Announcements I see several announcement properties, but unfortunately none that would give us this behavior out of the box.

2) Determine what class is processing the data that's submitted from the form. Pretty much all of LIferay's core portlets use struts, so you'll need to figure out the action URL and then look into the struts-config to identify the action class. For something like this, I'd suspect this might be the place you'll need to make your modification. I don't have the source in front of me, but I'd guess the struts action is only looking for one entry in the submitted form so you might need to modify the action to read all of the items selected from your updated jspf. The best way to customize struts actions is with a struts hook which you can read about in the struts section of the Liferay Developer Guide. .

3) If a struts action won't do the trick you might need to override the underlying announcement service, but I don't think that would be required in this case. If it is, you can learn more about how to do that in the service wrapper hook section of the Developer Guide.

Hope that helps you get started.
Joshua Bertrand,修改在10 年前。

RE: Possible to adjust Announcements Portlet to post to multiple scopes?

New Member 帖子: 17 加入日期: 12-5-1 最近的帖子
Jeffrey,

Thank you very much for the thorough answer! Looks like I've got some investigating to do.. If I figure out the solution, I will certainly post the answer here since I haven't been to find it anywhere else.

Thanks again,

Josh
Eric Smith,修改在10 年前。

RE: Possible to adjust Announcements Portlet to post to multiple scopes?

Junior Member 帖子: 66 加入日期: 12-8-28 最近的帖子
Josh, have you made any progress on this? I'm interested in this functionality as well.

Thanks,

Eric