掲示板

Printing Error, Success, and Warning messages in portlets

12年前 に Dean Grobler によって更新されました。

Printing Error, Success, and Warning messages in portlets

thumbnail
12年前 に srikanth a によって更新されました。

RE: Printing Error, Success, and Warning messages in portlets

Regular Member 投稿: 144 参加年月日: 11/02/21 最新の投稿
Hi Dean,
As per your post, you want to display the success and error message in your portlet.
did you added those keys in the session. Could you please add them in the below way in your java class.

for success messages:=====> SessionMessages.add(actionRequest, "success");

for error messages :=====>> SessionErrors.add(actionRequest, "<key value>");

then try access them in the jsp using the "liferay-ui" tag.


hope it solves your problem.



regards
Sri
12年前 に Dean Grobler によって更新されました。

RE: Printing Error, Success, and Warning messages in portlets

thumbnail
12年前 に Jan Gregor によって更新されました。

RE: Printing Error, Success, and Warning messages in portlets

Regular Member 投稿: 224 参加年月日: 10/10/20 最新の投稿
Hi there,

Well if you have already a mechanism for storing the error message in some bean, or request variable, you can just display your message using :

<span class="portlet-msg-error"><%=message%></span>

Instead of portlet-msg error you can use "portlet-msg-success" or "portlet-msg-warning".

If you are using jsp, the message variable should hold your message. This styles are defined in liferay theme.

Hope it helps.

Jan.
thumbnail
12年前 に Hajri Mohamed によって更新されました。

RE: Printing Error, Success, and Warning messages in portlets

Junior Member 投稿: 71 参加年月日: 11/03/02 最新の投稿
thank you for this post, it was valuable for me,
just the portlet-msg-warning is not working for me, the two others are working well, any one that get the same issue ??
10年前 に Nicola Baiocco によって更新されました。

RE: Printing Error, Success, and Warning messages in portlets

New Member 投稿: 5 参加年月日: 13/11/27 最新の投稿
You can use class="portlet-msg-alert" (in Liferay 6.0.6 works fine).
thumbnail
8年前 に Varun Jain によって更新されました。

RE: Printing Error, Success, and Warning messages in portlets

New Member 投稿: 2 参加年月日: 15/06/01 最新の投稿
Jan Gregor:
Hi there,

Well if you have already a mechanism for storing the error message in some bean, or request variable, you can just display your message using :

<span class="portlet-msg-error"><%=message%></span>

Instead of portlet-msg error you can use "portlet-msg-success" or "portlet-msg-warning".

If you are using jsp, the message variable should hold your message. This styles are defined in liferay theme.

Hope it helps.

Jan.



Hi Jan Gregor,

I too faced the same issue. But now it's solved with this solution.
Thanks a lot

Regards,
Varun Jain