Posts

Showing posts from 2013

How to use two (multiple) Liferay UI Search Container tags in a single JSP

If you are trying to include multiple Liferay UI Search Container in one jsp, you might encounter problem in pagination. As a solution use curParam with different names for different search container. <liferay-ui:search-container delta="20" curParam="actualCurParam" deltaConfigurable="false" emptyResultsMessage="There are no bank balance recorded yet."> <liferay-ui:search-container delta="20" curParam="forcastCurParam" deltaConfigurable="false" emptyResultsMessage="There are no transactions recorded yet.">

Bad column names in liferay

Here are the list of column name that is bad practice to be used in liferay  custom table. The list is given from Liferay itself. abstract access active add alias all alter analyze and as asc asensitive assert auto before between bigint binary blob boolean both break by byte call cascade case catch change char character check class code collate column comment condition const constraint continue convert create cross currency current_date current_time current_timestamp current_user cursor data database databases date day_hour day_microsecond day_minute day_second dec decimal declare default delayed delete desc describe deterministic distinct distinctrow div do double drop dual each else elseif enclosed end enum escaped exists exit explain extends false featured fetch fields final finally float float4 float8 for force foreign from full fulltext goto grant group having hidden high_priority hour_microsecond hour_minute hour_second hyperlink id idd if ignore implements import in in...

Bad table names in liferay

Here are the list of bad table names that have been listed by Liferay itself. Account Action Cache ClassName Contact Group Index Lock Organization Permission Release Resource Role User

formating liferay search container column data

<liferay-ui:search-container-column-text name="AMOUNT" buffer=" buffer " cssClass="number-align" orderableProperty="amount"> <%                    buffer .append((TransactionTypeLocalServiceUtil.getTransactionType(transaction.getCategoryId()).isCashIn())?"$"+decimalFormating.format(transaction.getAmount()):negativeDecimalFormating.format(transaction.getAmount())); %> </liferay-ui:search-container-column-text>

Disable form post while refreshing the page

Suppose you submitted the form and after successful action call you are redirected to the new page. There if you refresh the page, you are asked to submit the form again. In that case, to disable this use the following configuration. Add this line after <icon> tag in liferay-portal.xml <action-url-redirect>true</action-url-redirect>

Play VCD in VLC Player in Ubuntu

Type this command to play vcd in vlc palyer in ubuntu. vlc vcd:///dev/sr0

Disable browser back button using javascript

<script type="text/javascript">         function noBack() {      window.location.href += "#";      setTimeout("changeHashAgain()", "50");     }     function changeHashAgain() {       window.location.href += "1";     }         var storedHash = window.location.hash;     window.setInterval(function () {         if (window.location.hash != storedHash) {              window.location.hash = storedHash;         }     }, 50); </script> <body onLoad="noBack()"> </body>