Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Prevent SessionMessages "Your request processed successfully." Corné Aussems 14 septembre 2010 05:53
RE: Prevent SessionMessages "Your request processed successfully." Nagendra Kumar Busam 14 septembre 2010 08:37
RE: Prevent SessionMessages "Your request processed successfully." Amos Fong 14 septembre 2010 09:58
RE: Prevent SessionMessages "Your request processed successfully." Corné Aussems 15 septembre 2010 14:06
RE: Prevent SessionMessages "Your request processed successfully." Sandeep Nair 28 novembre 2010 09:36
RE: Prevent SessionMessages "Your request processed successfully." Nilesh Gundecha 19 septembre 2011 07:00
RE: Prevent SessionMessages "Your request processed successfully." Sandeep Nair 19 septembre 2011 21:36
RE: Prevent SessionMessages "Your request processed successfully." Nilesh Gundecha 19 septembre 2011 21:58
RE: Prevent SessionMessages "Your request processed successfully." Sandeep Nair 20 septembre 2011 01:05
RE: Prevent SessionMessages "Your request processed successfully." Nilesh Gundecha 20 septembre 2011 05:41
RE: Prevent SessionMessages "Your request processed successfully." Ranga Rao Bobbili 20 septembre 2011 05:02
RE: Prevent SessionMessages "Your request processed successfully." Nilesh Gundecha 20 septembre 2011 05:42
RE: Prevent SessionMessages "Your request processed successfully." Jelmer Kuperus 20 septembre 2011 05:48
RE: Prevent SessionMessages "Your request processed successfully." Nilesh Gundecha 20 septembre 2011 05:55
RE: Prevent SessionMessages "Your request processed successfully." Jelmer Kuperus 20 septembre 2011 06:01
RE: Prevent SessionMessages "Your request processed successfully." Nilesh Gundecha 20 septembre 2011 06:02
RE: Prevent SessionMessages "Your request processed successfully." Anh Lee 24 février 2013 19:02
RE: Prevent SessionMessages "Your request processed successfully." fabian fernandez 16 septembre 2014 14:33
Corné Aussems
Prevent SessionMessages "Your request processed successfully."
14 septembre 2010 05:53
Réponse

Corné Aussems

Rang: Liferay Legend

Publications: 1312

Date d'inscription: 3 octobre 2006

Publications Récentes

I like to keep my jsp free from code (as much as possible considering liferays ui taglibs)

So far so good no problems here; emoticon

I have a ADD button declared with a actionUrl;
1<a href="<portlet:actionURL name="addNew" />"><liferay-ui:message    key="add" /></a


Using annotations i do my thing in the portlets addNew method; no hrams here

But every time i hit the(any) action url i get the message "Your request processed successfully." displayed

When i look into the SessionMessages object in the addNew methode thers no message at all;
SessionMessages.clear() doesn't help either;

Why is this message always set en how should i prevent it from displaying ?


BTW im using
LR 605
com.liferay.util.bridges.mvc.MVCPortlet
Nagendra Kumar Busam
RE: Prevent SessionMessages "Your request processed successfully."
14 septembre 2010 08:37
Réponse

Nagendra Kumar Busam

Rang: Liferay Master

Publications: 653

Date d'inscription: 7 juillet 2009

Publications Récentes

Hi Corne,

Did you tried clearing SessionMessages in render method?

I hope portlet_messages.jspf is the file which used to display these messages

Regards,
- Nagendra KUmar
Amos Fong
RE: Prevent SessionMessages "Your request processed successfully."
14 septembre 2010 09:58
Réponse

Amos Fong

LIFERAY STAFF

Rang: Liferay Legend

Publications: 1898

Date d'inscription: 7 octobre 2008

Publications Récentes

Hi,

There's a couple options. To always not show it you add this in portlet.xml

1        <init-param>
2            <name>add-process-action-success-action</name>
3            <value>false</value>
4        </init-param>


or if you want to change to logic say for just one action you can override the method:

 1    protected void addSuccessMessage(
 2        ActionRequest actionRequest, ActionResponse actionResponse) {
 3
 4        if (!addProcessActionSuccessMessage) {
 5            return;
 6        }
 7
 8        String successMessage = ParamUtil.getString(
 9            actionRequest, "successMessage");
10
11        SessionMessages.add(actionRequest, "request_processed", successMessage);
12    }
Corné Aussems
RE: Prevent SessionMessages "Your request processed successfully."
15 septembre 2010 14:06
Réponse

Corné Aussems

Rang: Liferay Legend

Publications: 1312

Date d'inscription: 3 octobre 2006

Publications Récentes

Thanks for sharing Amos
Sandeep Nair
RE: Prevent SessionMessages "Your request processed successfully."
28 novembre 2010 09:36
Réponse

Sandeep Nair

Rang: Liferay Legend

Publications: 1721

Date d'inscription: 5 novembre 2008

Publications Récentes

Hi Amos,

Thanks for the solution. One query i had is, i normally use annotation based process action, so what should i do to hide the messages from certain annotation based processAction.

I didnot quite actually understand the second method of overriding the method.

Regards,
Sandeep
Nilesh Gundecha
RE: Prevent SessionMessages "Your request processed successfully."
19 septembre 2011 07:00
Réponse

Nilesh Gundecha

Rang: Regular Member

Publications: 196

Date d'inscription: 30 novembre 2009

Publications Récentes

Hi Corne and Sandip,

As per the 2 options given by Corne, I tried the first one but thats not reflecting.

I am doing it Liferay Login Portlet.

Can you please point out where I must be getting wrong.

Regards,

Nilesh
Sandeep Nair
RE: Prevent SessionMessages "Your request processed successfully."
19 septembre 2011 21:36
Réponse

Sandeep Nair

Rang: Liferay Legend

Publications: 1721

Date d'inscription: 5 novembre 2008

Publications Récentes

Which version of liferay are you using. It will work if you are using GenericPortlet.
Nilesh Gundecha
RE: Prevent SessionMessages "Your request processed successfully."
19 septembre 2011 21:58
Réponse

Nilesh Gundecha

Rang: Regular Member

Publications: 196

Date d'inscription: 30 novembre 2009

Publications Récentes

Thanks for the reply Sandip.

I am using Liferay 6.0.6 CE. And I want to disable the SessionMessage "Your request processed successfully." for the Liferay Login portlet.

So I tried the first option given by Corne by modifying the portlet-custom.xml, but that didnt help.

Can you please tell me how can I override addSuccessMessage() method for login portlet.

Thanks and Regards,

Nilesh
Sandeep Nair
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 01:05
Réponse

Sandeep Nair

Rang: Liferay Legend

Publications: 1721

Date d'inscription: 5 novembre 2008

Publications Récentes

Hi Neelesh,

It should work. Please debug the source code. Check for LiferayPortlet class which StrutsPortlet uses, there is an init method in which the variable is read. Debug there and see, if it is set to false or not

Regards,
Sandeep
Ranga Rao Bobbili
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 05:02
Réponse

Ranga Rao Bobbili

Rang: Regular Member

Publications: 152

Date d'inscription: 20 juillet 2007

Publications Récentes

One more solution, but i will remove message for all other operations. Create hook for html\common\themes\ portlet_messages.jspf.
Remove following content from portlet_messages.jspf.

<c:if test='<%= SessionMessages.contains(renderRequest, "request_processed") %>'>
<div class="portlet-msg-success">

<%
String successMessage = (String)SessionMessages.get(renderRequest, "request_processed");
%>

<c:choose>
<c:when test='<%= Validator.isNotNull(successMessage) && !successMessage.equals("request_processed") %>'>
<%= successMessage %>
</c:when>
<c:otherwise>
<liferay-ui:message key="your-request-processed-successfully" />
</c:otherwise>
</c:choose>
</div>
</c:if>
Nilesh Gundecha
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 05:41
Réponse

Nilesh Gundecha

Rang: Regular Member

Publications: 196

Date d'inscription: 30 novembre 2009

Publications Récentes

Hi Sandeep,

I tried from login.jsp checking the output for

1GetterUtil.getBoolean(getInitParameter("add-process-action-success-action"), true)

This always returned true for me irrespective of whether I set true or false in portlet-custom.xml.

But when I tried this -
1GetterUtil.getBoolean(getPortletConfig().getInitParameter("add-process-action-success-action"), true)

Then this is returning me the correct expected value.


As I navigated thru the LR Source, I found that LR is using the
1GetterUtil.getBoolean(getInitParameter("add-process-action-success-action"), true)

which always returns true.

So if this is true, does this mean this is the bug in Liferay?

Regards,
Nilesh.
Nilesh Gundecha
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 05:42
Réponse

Nilesh Gundecha

Rang: Regular Member

Publications: 196

Date d'inscription: 30 novembre 2009

Publications Récentes

Hi Ranga Rao,

Many Thanks for the help.

But I want to make it for only one portlet, that is Login Portlet.

Regards,
Nilesh.
Jelmer Kuperus
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 05:48
Réponse

Jelmer Kuperus

Rang: Liferay Legend

Publications: 1192

Date d'inscription: 10 mars 2010

Publications Récentes

add-process-action-success-action wont work for any of the built in portlets. Its a setting used on portlets that extend from LiferayPortlet / MvcPortlet

For me the login portlet never shows the success message btw. When i log in it just shows "You are signed in as x"
Nilesh Gundecha
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 05:55
Réponse

Nilesh Gundecha

Rang: Regular Member

Publications: 196

Date d'inscription: 30 novembre 2009

Publications Récentes

jelmer kuperus:
add-process-action-success-action wont work for any of the built in portlets. Its a setting used on portlets that extend from LiferayPortlet / MvcPortlet

For me the login portlet never shows the success message btw. When i log in it just shows "You are signed in as x"


Hi Jelmer,

Thanks for reply. I really didnt have any idea that add-process-action-success-action don't work for Built-in portlets.

I get the Success message in login portlet when I do the "Forgot Password". I wanted to disable it.

Thanks,

Nilesh.
Jelmer Kuperus
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 06:01
Réponse

Jelmer Kuperus

Rang: Liferay Legend

Publications: 1192

Date d'inscription: 10 mars 2010

Publications Récentes

The only thing you can do is extend ForgotPasswordAction in ext and override addSuccessMessage(ActionRequest actionRequest, ActionResponse actionResponse) to do nothing

There is no configuration option that lets you disable the message
Nilesh Gundecha
RE: Prevent SessionMessages "Your request processed successfully."
20 septembre 2011 06:02
Réponse

Nilesh Gundecha

Rang: Regular Member

Publications: 196

Date d'inscription: 30 novembre 2009

Publications Récentes

Yeah. Thank you very much for all the support.
Anh Lee
RE: Prevent SessionMessages "Your request processed successfully."
24 février 2013 19:02
Réponse

Anh Lee

Rang: New Member

Publications: 4

Date d'inscription: 24 février 2013

Publications Récentes

Thank for share Amos
fabian fernandez
RE: Prevent SessionMessages "Your request processed successfully."
16 septembre 2014 14:33
Réponse

fabian fernandez

Rang: New Member

Publications: 5

Date d'inscription: 19 septembre 2012

Publications Récentes

entonces, simplemente colocando:

addProcessActionSuccessMessage = false;

se logra el objetivo sin necesidad de reescribir el método.

muy útil!!!