论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Joshua Bertrand
Possible to adjust Announcements Portlet to post to multiple scopes?
2013年4月25日 上午8:15
答复

Joshua Bertrand

等级: New Member

帖子: 17

加入日期: 2012年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
Jeffrey Handa
RE: Possible to adjust Announcements Portlet to post to multiple scopes?
2013年4月25日 下午12:10
答复

Jeffrey Handa

LIFERAY STAFF

等级: Liferay Master

帖子: 501

加入日期: 2008年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
RE: Possible to adjust Announcements Portlet to post to multiple scopes?
2013年4月25日 下午1:12
答复

Joshua Bertrand

等级: New Member

帖子: 17

加入日期: 2012年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
RE: Possible to adjust Announcements Portlet to post to multiple scopes?
2013年5月2日 下午2:12
答复

Eric Smith

等级: Junior Member

帖子: 66

加入日期: 2012年8月28日

最近的帖子

Josh, have you made any progress on this? I'm interested in this functionality as well.

Thanks,

Eric