Search This Blog

Showing posts with label jsp. Show all posts
Showing posts with label jsp. Show all posts

Friday, October 18, 2013

To make JSP compatible with IE8 or IE 9

Add the following code to the javascript block.

#if ($browserSniffer.getMajorVersion($request) < 9)
  <meta http-equiv="X-UA-Compatible" content="IE=8" />
#else
  <meta http-equiv="X-UA-Compatible" content="IE=9" />
#end

this will make the jsp compatible with IE 8 or IE 9

Happy Coding !!

 

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;
   }

My Blog List