Fórum
Printing Error, Success, and Warning messages in portlets
Dean Grobler, modificado 12 Anos atrás.
Printing Error, Success, and Warning messages in portlets
srikanth a, modificado 12 Anos atrás.
RE: Printing Error, Success, and Warning messages in portlets
Regular Member Postagens: 144 Data de Entrada: 21/02/11 Postagens Recentes
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
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
Dean Grobler, modificado 12 Anos atrás.
Hi Jan Gregor,
I too faced the same issue. But now it's solved with this solution.
Thanks a lot
Regards,
Varun Jain
RE: Printing Error, Success, and Warning messages in portlets
Jan Gregor, modificado 12 Anos atrás.
RE: Printing Error, Success, and Warning messages in portlets
Regular Member Postagens: 224 Data de Entrada: 20/10/10 Postagens Recentes
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.
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.
Hajri Mohamed, modificado 12 Anos atrás.
RE: Printing Error, Success, and Warning messages in portlets
Junior Member Postagens: 71 Data de Entrada: 02/03/11 Postagens Recentes
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 ??
just the portlet-msg-warning is not working for me, the two others are working well, any one that get the same issue ??
Nicola Baiocco, modificado 10 Anos atrás.
RE: Printing Error, Success, and Warning messages in portlets
New Member Postagens: 5 Data de Entrada: 27/11/13 Postagens Recentes
You can use class="portlet-msg-alert" (in Liferay 6.0.6 works fine).
Varun Jain, modificado 8 Anos atrás.
RE: Printing Error, Success, and Warning messages in portlets
New Member Postagens: 2 Data de Entrada: 01/06/15 Postagens RecentesJan 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