Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Leandro Concon
Pre-loader - Instructions INSERT ( Service )
December 3, 2012 2:25 PM

Leandro Concon

Rank: New Member

Posts: 8

Join Date: June 27, 2012

Recent Posts

it is possible to execute instructions during the insert deploy the portlet? I would run the same happens with the creation of the tables in the table.sql.
David H Nebinger
RE: Pre-loader - Instructions INSERT ( Service )
December 4, 2012 5:48 AM

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 13225

Join Date: September 1, 2006

Recent Posts

Usually you would do this using a normal startup process including some sort of check to determine if it was ever completed before.

For example, I've used afterPropertiesSet() to determine if there are any entities available; when no entities, I know it's the first time my code is being executed and I can create my initial entities.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!