Posts

Showing posts from May, 2013

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>