extjs - Liferay cleans the session thus cleans the message that i add into SessionErrors.add in an EXT plugin in Liferay 6.1 -
this question can considered extension of how show error message in liferay portal?
working on ext plugin in liferay 6.1 , customizing updatelookandfeelaction, putting error message sessionmessages.add(request,"custom-error-msg");
seems portlet lifecycle cleans session in portalrequestprocessor.java
(line 186) deleting session message well. normal your settings saved successfull rendered
how can stop further execution in custom updatelookandfeelaction
, render error message on /html/portlet/portlet_css/view.jsp
i have added <liferay-ui:error key="custom-error-msg" message="custom.error.msg" />
in view.jsp
i think read somewhere have create hook , customize end.jsp
. right approach? suggestions , directions appreciated.
i had override look_and_feel.js
following:
var savehandler = function(event, id, obj) { var ajaxresponsemsg = instance._portletmsgresponse; var ajaxresponsehtml = '<div id="lfr-portlet-css-response"></div>'; var message = ''; var messageclass = ''; var type = 'success'; ***var customerrormessage = obj.response;*** ***if (obj.statustext.tolowercase() == 'ok' && obj.response != '') { type = 'customerror'; }*** if (obj.statustext.tolowercase() != 'ok') { type = 'error'; } if (type == 'success') { message = liferay.language.get('your-request-processed-successfully'); messageclass = 'portlet-msg-success'; } ***else if(type == 'customerror') { message = customerrormessage; /*message = liferay.language.get('custom.error.msg');*/ messageclass = 'portlet-msg-error'; }*** else { message = liferay.language.get('your-settings-could-not-be-saved'); messageclass = 'portlet-msg-error'; }
in updatelookandfeel had return custom error message in json object.
Comments
Post a Comment