Search This Blog

Friday, July 19, 2013

How to remove the message you-have-entered-invalid-data

There are several ways to remove the message from displaying. This message is present in the portal at the following path :-

   html\taglib\ui\error\end.jsp   


To remove the display use any of the following mentioned approach:

1. Using HOOK for all portlets :create a hook and edit the end.jsp file. In which you can comment out the lines , then the message will not be displayed for any of the portlets in  Liferay.

2. Using HOOK for specific portlet: create a hook and edit the end.jsp file. Use the portletId to show/hide the message display.


 


3. Masking with Custom Message in Portlet :
Change that message key in your portlet's language.properties file with your custom text.
Like, in the language_en.properties file for your custom portlet. add the custom message to the key:

   you-have-entered-invalid-data=Server Error: Please try again. 


4. Using CSS property:
Hook the file end.jsp (at html\taglib\ui\error\end.jsp ) with a surrounding CSS.


in the custom CSS of your portlet add

   .portlet-msg-error-invalid-data-show-hide{
     display : none;
   }

No comments:

Post a Comment

My Blog List