Monday, January 13, 2014

PrimeFaces DataTable Selection Event

Following is the list of available events for row selection when using <p:dataTable />

No. Event Purpose/Usage
1 rowSelect Select a row by clicking on the row
2 rowUnselect Unselect a row by clicking on the row
3 rowSelectCheckbox Select a row by checking the selection checkbox
4 rowUnselectCheckbox Unselect a row by unchecking the selection checkbox
5 toggleSelect Select/Unselect all rows by clicking on the header checkbox
6 rowDblselect Select/Unselect a row when D-click



Done!!

Friday, January 10, 2014

Getting Liferay Signed in user in XHTML

Check the session is signed in in XHTML
#{facesContext.externalContext.requestMap['THEME_DISPLAY'].signedIn}

Get the signed in user in XHTML
#{facesContext.externalContext.requestMap['THEME_DISPLAY'].user}

Get the signed in user's properties in XHTML
#{facesContext.externalContext.requestMap['THEME_DISPLAY'].fullName}

#{facesContext.externalContext.requestMap['THEME_DISPLAY'].lastLoginDate}

Tuesday, January 7, 2014

How to configure memory for Oracle SQL Developer

To increase maximum memory to use

1. Navigate to <SQL_Developer_Installation_Dir>/sqldeveloper/bin
2. Open sqldeveloper.bat with notepad
3. edit the Xmx vm option

To increase maximum Perm size to use

1. Navigate to <SQL_Developer_Installation_Dir>/sqldeveloper/bin
2. Open sqldeveloper.conf with notepad
3. edit the MaxPermSize vm option


Done!!

Saturday, January 4, 2014

How to define Permission for a role in Liferay

1. Login as Administrator

2. Go to > Control Panel > Portal > Roles

3. Click on a Role, eg. My Role

Wednesday, January 1, 2014

EclipseLink Static weaving with Ant

<?xml version="1.0"?>
<!DOCTYPE project>

<project name="staticWeaving" default="weaving">  

<target name="define.task"
description="New task definition for EclipseLink static weaving" >
<taskdef
name="weave"
classname="org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask">
<classpath refid="project.class.path" />
</taskdef>
</target>

<target name="weaving" description="perform weaving." depends="define.task">
<weave
source="original-jpa.jar"
target="weaved-jpa.jar"
persistenceinfo="${jpaProjectHome}\classes">
<classpath refid="project.class.path" />
</weave>
</target>

<path id="project.class.path">
   <pathelement path="eclipselink.jar/"/>
  <pathelement path="hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
</path>

</project>

LinkWithin

Related Posts Plugin for WordPress, Blogger...