I'am using JBoss 7.1.1 with Liferay 6.2GA. I need a portlet instance on each page. The constructor of the MVCPortlet class is only called after deploying the portlet, so it's just instantiate one time (after deploying).
I tried
<instanceable>true</instanceable>
in liferay-portlet.xml but this didn't changed anything.
How can I create a new instance of my portlet when I drag the portlet out of the 'add application' menu to place it on a, just for this instance, created page?
In order to control the number of instances, I did:
public class Controller extends MVCPortlet {
private final static Logger log = Logger.getLogger("Controller");
private int instance = 0;
public Controller() {
instance++;
log.info("instance: " + instance);
}
}