留言板

How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbeans)

Stan M,修改在14 年前。

How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbeans)

Regular Member 帖子: 208 加入日期: 08-1-28 最近的帖子
LP 5.2.3

I am attempting to create a portlet similar to the Page Comment which uses the Discussion UI tag under PluginSDK or Netbeans with the Portal Pack. I do not use Struts.


The Page Comment has this :


        <portlet:actionurl var="discussionURL">
                <portlet:param name="struts_action" value="/page_comments/edit_page_discussion" />
        </portlet:actionurl>

        <liferay-ui:discussion formName="fm" formAction="<%= discussionURL %>" className="<%= Layout.class.getName() %>" classPK="<%= layout.getPlid() %>" userId="<%= user.getUserId() %>" subject="<%= layout.getName(locale) %>" redirect="<%= currentURL %>" />


---

I am able to display the GUI ("Add Comment" link, textbox, Reply, Cancel).



        <portlet:actionurl var="discussionURL">
                <portlet:param name="struts_action" value="/page_comments/edit_page_discussion" />
        </portlet:actionurl>

        <liferay-ui:discussion formName="fm" formAction="<%= discussionURL %>" className="com.liferay.portal.model.MyEntity" classPK="99999" userId="<%= user2.getUserId() %>" subject="subject" redirect="<%= currentURL %>" />

---

The problem is that inputs are not saved. I suspect that it may be discussionURL because I actually do not have that in my portlet.

What do I need to do to reuse this tag in a custom portlet?
thumbnail
Auditya manikanta Vadrevu,修改在14 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Liferay Master 帖子: 621 加入日期: 08-5-6 最近的帖子
change the struts path value to your custom portlet path, and add the entries in struts-config & tiles-def xml files (use the same action class). It works fine
B K,修改在13 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

New Member 发布: 1 加入日期: 10-8-12 最近的帖子
Hi,

I have the same problem as you with Discussion UI tag.

Did you resolve it? If so, could I ask for any suggestion how to use this tag without Struts or maybe easy way how to apply Struts to JSP portlet?

Thanks for the advise,
bk
Stan X,修改在13 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Regular Member 帖子: 208 加入日期: 08-1-28 最近的帖子
I have not figured it out. When I do, I will share it here.
thumbnail
Puj Z,修改在13 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Regular Member 帖子: 220 加入日期: 10-1-14 最近的帖子
I haven't done it myself, but shouldn't you attach comments (discussion) to a custom asset (A model of yours)?

In that case, you should put the className of your Bean (Model, Asset, TO, or whatever you call it) in the tag.
thumbnail
Abhed Dekavadiya,修改在13 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Junior Member 帖子: 74 加入日期: 10-10-5 最近的帖子
Hi,

I have used <liferay-ui:discussions> on custom portlet for liferay-6.

Please refer below post:
http://www.liferay.com/community/forums/-/message_boards/message/6723626
thumbnail
Ahmed Hasan,修改在13 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Expert 帖子: 306 加入日期: 07-4-13 最近的帖子
Hi Stan,

We have successfully implemented this in one of our projects on LR6.0.5 and plugins. Will ask my colleague rizwan@mpowerglobal.com to put down the steps for your reference. He will be available in office in the new year.

Ahmed Hasan
mPower Global Inc.
thumbnail
Sagar A Vyas,修改在10 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Liferay Master 帖子: 679 加入日期: 09-4-17 最近的帖子
Ahmed Hasan:
Hi Stan,

We have successfully implemented this in one of our projects on LR6.0.5 and plugins. Will ask my colleague rizwan@mpowerglobal.com to put down the steps for your reference. He will be available in office in the new year.

Ahmed Hasan
mPower Global Inc.



Ahmed,

If possible then Please share those steps.

Thanks,
Sagar Vyas
thumbnail
Ahmed Hasan,修改在10 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Expert 帖子: 306 加入日期: 07-4-13 最近的帖子
Hi Sagar,

Sorry for the delayed reply as i did not access forums for may days.

You can get the complete steps in Chapter no 12 of my free eBook on Liferay. You can download a copy and refer to your self. Feel free to pass on the book's like with your friends and colleagues.

Yours truly,
Ahamed Hasan
Author of the most comprehensive guide, Liferay Portlet Cookbook.
thumbnail
Sagar A Vyas,修改在10 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Liferay Master 帖子: 679 加入日期: 09-4-17 最近的帖子
Ahmed Hasan:
Hi Sagar,

Sorry for the delayed reply as i did not access forums for may days.

You can get the complete steps in Chapter no 12 of my free eBook on Liferay. You can download a copy and refer to your self. Feel free to pass on the book's like with your friends and colleagues.

Yours truly,
Ahamed Hasan
Author of the most comprehensive guide, Liferay Portlet Cookbook.



Thanks Ahmed for helping on this but I am not able to download this book, is it paid one ? if no can you please share it with me ?

Thanks,
Sagar Vyas
Hi! I am Liferay
thumbnail
Sagar A Vyas,修改在10 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Liferay Master 帖子: 679 加入日期: 09-4-17 最近的帖子
Stan X:
LP 5.2.3

I am attempting to create a portlet similar to the Page Comment which uses the Discussion UI tag under PluginSDK or Netbeans with the Portal Pack. I do not use Struts.


The Page Comment has this :


        <portlet:actionurl var="discussionURL">
                <portlet:param name="struts_action" value="/page_comments/edit_page_discussion" />
        </portlet:actionurl>

        <liferay-ui:discussion formName="fm" formAction="<%= discussionURL %>" className="<%= Layout.class.getName() %>" classPK="<%= layout.getPlid() %>" userId="<%= user.getUserId() %>" subject="<%= layout.getName(locale) %>" redirect="<%= currentURL %>" />


---

I am able to display the GUI ("Add Comment" link, textbox, Reply, Cancel).



        <portlet:actionurl var="discussionURL">
                <portlet:param name="struts_action" value="/page_comments/edit_page_discussion" />
        </portlet:actionurl>

        <liferay-ui:discussion formName="fm" formAction="<%= discussionURL %>" className="com.liferay.portal.model.MyEntity" classPK="99999" userId="<%= user2.getUserId() %>" subject="subject" redirect="<%= currentURL %>" />

---

The problem is that inputs are not saved. I suspect that it may be discussionURL because I actually do not have that in my portlet.

What do I need to do to reuse this tag in a custom portlet?


It might too late for you but for other it can be useful.

I have faced lot of issue with discussion tag with custom portlet and finally got resolved it.

Also I have written a blog on this you can visit in case of it requires

Solution:Error while integrate Liferay OOB comment functionality with MVC portlet ?

Hope this help to everyone.

Thanks,
Sagar Vyas
Hi! I am Liferay
thumbnail
Ahmed Hasan,修改在10 年前。

RE: How to use liferay-ui:discussion with custom portlet (PluginSKD/Netbean

Expert 帖子: 306 加入日期: 07-4-13 最近的帖子
Dear Sagar,

Thanks for writing the blog on this aspect.

Hope you were able to download my book and refer to this topic there as well. Please revert back to me should you face any issues.

Yours truly,
Ahamed Hasan
Author, Liferay Portlet Cookbook