Hi,
Im new Liferay user/developer so please foregive me if I misunderstood something.
What Im trying to do is to develop custom theme and "include" custom portled inside velocity template.
1)I devloped simple helo-world portlet and deployed it to Liferay.
project_name:MyPortlet-portlet
portlet_id:MyPortlet
deploment type: plugin (subfolder in tomcat webapps)
2)I developed simple theme and override one of velocity templates (portal_normal.vm).
In the template I added few lines of velcity code:
1#set ($VOID = $velocityPortletPreferences.setValue('display-style', '1'))
2#set ($VOID = $velocityPortletPreferences.setValue('portlet-setup-show-borders', 'false'))
3#set ($myPortletId = "[b]MyPortlet_INSTANCE_E3j7_WAR_MyPortlet-portlet[/b]")
4$taglibLiferay.runtime($myPortletId, '', $velocityPortletPreferences.toString())
5#set ($VOID = $velocityPortletPreferences.reset())
3)When I deploy this theme and refresh page nothing is displayed in place of this "inclusion". When I add my portlet with page->add->... Hello world appears.
I debug Liferay for a whole day and probably found a cause.
Its in the RuntimePortletUtil.processPortlet(...) method:
1String instanceId = portlet.getInstanceId();
For my template this instanceId = "E3j7_WAR_MyPortlet-portlet"
As I suspect the correct version should be only "E3j7".
Thats why few lines of code below validation fails (id length != 4) and "Portlet is instanceable but does not have a valid instance id" is displayed.
Ive tried with difrrent portledId passed to $taglibLiferay.runtime but nothing work.
Regarding to this wiki page my Id should work:
wikiDo I do something wrong ? What is a difference beetween $taglibLiferay.runtime and $theme.runtime ??
Reagrds Daniel
Please sign in to flag this as inappropriate.