Wednesday, April 30, 2014

How to reverse engineer existing schema with Oracle SQL Developer Data Modeler

Oracle SQL Developer Data Modeler is a very nice tool.
It's very useful on creating Data Model design; besides, it could also help us to reverse engineer the existing schema into Data Model design.
Below are the steps to reverse engineer an existing schema into Data Model.

1. Goto Data Dictionary Import Wizard
    File > Import > Data Dictionary

2. Choose a Data Dictionary to import
    Choose a configured Data Dictionary from the right table with Connection Name and Connection Details.
    If the expected Data Dictionary is not there, then follow this link to create it.

Monday, April 28, 2014

How to enable CKEditor in PrimeFaces Extension

The CKEditor is not enabled by default when adding PrimeFaces Extension into PrimeFaces application.

There is only a textarea if the CKEditor is not enabled.

Thus, to enable the CKEditor, an additional jar needs to be included -- resources-ckeditor.jar
After added the resources-ckeditor.jar, the CKEditor displayed like below.

resources-ckeditor.jar could be downloaded here.
Besides, remember to check the correct version of PrimeFaces Extension using in the system to avoid any unexpected issues.

Update for PrimeFaces5.1
- List of library required to use CKEditor with PF5.1


Friday, April 25, 2014

How to define Category for custom portlet in Liferay

When we deploying portlets into Liferay portal, somehow we need to define new Category Name for our customized portlets instead of just place all the portlet under Sample.
Below are the steps how to define new Category in Liferay portal.

1. Open liferay-display.xml
<?xml version="1.0"?>
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.1.0//EN" "">

 <category name="category.sample">
  <portlet id="primefaces" />

Thursday, April 17, 2014

Possible ways to hide/show Portlet border in Liferay

There are several ways to hide/show portlet border in Liferay.
1. Configure in every portlet.
To show/hide portlet border in every individual portlet, detailed steps shown in previous post.

2. Configure in theme;
All portlets within the configured theme will be show/hide border by default.
add the following line into liferay-look-and-feel.xml
the value is either true or false.
<theme id="myTheme" name="myTheme" >
        <setting key="portlet-setup-show-borders-default" value="true|false" />

3. Configure in;
All portlets will be show/hide border by default
add the following line into
the value is either true or false.



Sunday, April 13, 2014

Adding second, minute, hour, day to

long secondInMilis  = 1000;
long minuteInMilis  = secondInMilis * 60;
long hourInMilis  = minuteInMilis * 60;
long dayInMilis  = hourInMilis * 24;

Date add1Second = new Date(new Date().getTime() + secondInMilis);
Date add10Second = new Date(new Date().getTime() + (10 * secondInMilis));

Date add1Minute = new Date(new Date().getTime() + minuteInMilis);
Date add10Minute = new Date(new Date().getTime() + (10 * minuteInMilis));

Date add1Hour = new Date(new Date().getTime() + hourInMilis);
Date add10Hour = new Date(new Date().getTime() + (10 * hourInMilis));

Date add1Day = new Date(new Date().getTime() + dayInMilis);
Date add10Day = new Date(new Date().getTime() + (10 * dayInMilis));


How to increase memory and heap size in Eclipse

The default configuration in Eclipse is maximum memory 512mb, and heap size 256mb.
But that is normally not enough especially running server plugin in Eclipse, eg, Tomcat, JBoss

To run the server plugin smoothly, we need to increase the memory and heap size as below.

1. Open eclipse.ini in <Eclipse_installation_dir>

2. edit the memory and heap size to expected settings



Related Posts Plugin for WordPress, Blogger...